How to turn a package into something pip can install

Roy Smith roy at
Sat Feb 15 03:26:03 CET 2014

In article <mailman.6949.1392429645.18130.python-list at>,
 Ryan Gonzalez <rymg19 at> wrote:

> python sdist

OK, I run that and I get a metar-1.4.0.tar.gz under dist.  If I move 
that tarfile to my packages directory, and run pip, I get:

$ pip install --no-index --quiet --find-links packages metar==1.4.0
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/", line 551, in __bootstrap_inner
  File "/usr/lib/python2.7/", line 504, in run
    self.__target(*self.__args, **self.__kwargs)
1-py2.7.egg/pip/", line 245, in _get_queued_page
    page = self._get_page(location, req)
1-py2.7.egg/pip/", line 335, in _get_page
    return HTMLPage.get_page(link, req, cache=self.cache)
1-py2.7.egg/pip/", line 452, in get_page
    resp = urlopen(url)
1-py2.7.egg/pip/", line 85, in __call__
    response = urllib2.urlopen(self.get_request(url))
  File "/usr/lib/python2.7/", line 126, in urlopen
    return, data, timeout)
  File "/usr/lib/python2.7/", line 392, in open
    protocol = req.get_type()
  File "/usr/lib/python2.7/", line 254, in get_type
    raise ValueError, "unknown url type: %s" % self.__original
ValueError: unknown url type: packages

  Could not find any downloads that satisfy the requirement metar==1.4.0
No distributions at all found for metar==1.4.0
Storing complete log in /home/roy/.pip/pip.log

> On Fri, Feb 14, 2014 at 7:47 PM, Roy Smith <roy at> wrote:
> > I want to use (  Our
> > deployment process more or less requires that it be installed via pip.
> > We maintain our own cache of packages and install using:
> >
> > pip install --no-index --quiet --find-links packages --requirement
> > requirements.txt
> >
> > What I can't figure out is what I need to do to go from a clone of the
> > github repo to a tarball I can drop into our packages directory.  Is
> > there some tutorial somewhere that explains this?
> > --
> >
> >

More information about the Python-list mailing list