question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pip install --download throws error when used with setup.py file

See original GitHub issue

So here’s the case, If i do

pip install /path/to/mypackage

it works like expected extract proper requirements and install everything that is defined in mypackage setup.py file.

When i do

 mkdir /tmp/downloadcache
 pip install --download /tmp/downloadcache /path/to/mypackage

It throws an exception:

------------------------------------------------------------
/home/ubuntu/.virtualenvs/xxx/bin/pip run on Fri Mar  8 12:56:30 2013
Unpacking /appz/mypackage

  Running setup.py egg_info for package from file:///appz/mypackage

    Traceback (most recent call last):

      File "<string>", line 16, in <module>

    IOError: [Errno 2] No such file or directory: '/tmp/pip-AZvxJb-build/setup.py'

    Complete output from command python setup.py egg_info:

    Traceback (most recent call last):

  File "<string>", line 16, in <module>

IOError: [Errno 2] No such file or directory: '/tmp/pip-AZvxJb-build/setup.py'

----------------------------------------

Command python setup.py egg_info failed with error code 1 in /tmp/pip-AZvxJb-build

Exception information:
Traceback (most recent call last):
  File "/home/ubuntu/.virtualenvs/xxx/local/lib/python2.7/site-packages/pip/basecommand.py", line 139, in main
    status = self.run(options, args)
  File "/home/ubuntu/.virtualenvs/xxx/local/lib/python2.7/site-packages/pip/commands/install.py", line 266, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/home/ubuntu/.virtualenvs/xxx/local/lib/python2.7/site-packages/pip/req.py", line 1052, in prepare_files
    req_to_install.run_egg_info()
  File "/home/ubuntu/.virtualenvs/xxx/local/lib/python2.7/site-packages/pip/req.py", line 236, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/home/ubuntu/.virtualenvs/xxx/local/lib/python2.7/site-packages/pip/util.py", line 662, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command python setup.py egg_info failed with error code 1 in /tmp/pip-AZvxJb-build

Issue Analytics

  • State:open
  • Created 11 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
deveshkscommented, Apr 4, 2020

Hi @pradyunsg , @dstufft

Since pip install --download is now deprecated in favor of pip download, is this error still valid?

If yes, what would be the updated instructions to reproduce this and try to add the appropriate error/warning?

1reaction
dstufftcommented, Mar 22, 2017

Just as a note, the issue here appears to be that while pip download path/to/project successfully downloads all of the dependencies and claims to have downloaded the top level project, it has not in fact done so.

I’m not entirely sure what behavior would be expected though, because there is no artifact to download from an unpacked directory. Possibly this should just be an error or a warning that it can’t download a directory.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pip install throwing error relating to a function in setup.py
The solution was to download the library archive, extract it, convert the python file being scanned by setuptools to unix format, ...
Read more >
User Guide - pip documentation v22.3.1
pip supports installing from PyPI, version control, local projects, and directly from distribution files. The most common scenario is to install from PyPI...
Read more >
Python: Creating a pip installable package
pip is a package management system, specifically designed for installing Python packages from from the internet hosted Python Package Index (commonly known as ......
Read more >
Installing Packages - Python Packaging User Guide - Python.org
This section covers the basics of how to install Python packages. It's important to note that the term “package” in this context is...
Read more >
How to Fix 'Python Setup.py egg_info' Failed with Error Code 1
The issue with python package managers. The good news is that you do not have to manually add other programmers' code (packages) into...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found