FileNotFoundError from 'pipenv install requests' when pwd is a symlink
See original GitHub issueI cd to my project in this directory:
$ pwd
/home/jhartley/docs/code/unfinished/gloopy
But that’s actually using a symlink, ~/docs -> ~/Dropbox/jon-data. The actual directory name is:
$ pwd -P # resolves symlinks to give actual directory name
/home/jhartley/Dropbox/jon-data/code/unfinished/gloopy
Note ‘Dropbox’ has a capital ‘D’.
I just installed pipenv for first time ever. No Pipfile is present. $ pipenv install requests Gives the traceback below, which includes “Dropbox” spelled incorrectly, with a lower case “d”.
pipenv, version 7.6.3. Ubuntu 17.04. Pythons 2.7, 3.5 and 3.6 are installed, but ‘python’ is python2.7. Using --three doesn’t help.
I’m happy to do any more diagnostics if it helps.
Installing requests…
Collecting requests
Using cached requests-2.18.4-py2.py3-none-any.whl
Collecting idna<2.7,>=2.5 (from requests)
Using cached idna-2.6-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests)
Using cached chardet-3.0.4-py2.py3-none-any.whl
Collecting urllib3<1.23,>=1.21.1 (from requests)
Using cached urllib3-1.22-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests)
Using cached certifi-2017.7.27.1-py2.py3-none-any.whl
Installing collected packages: idna, chardet, urllib3, certifi, requests
Successfully installed certifi-2017.7.27.1 chardet-3.0.4 idna-2.6 requests-2.18.4 urllib3-1.22
Adding requests to Pipfile's [packages]…
P.S. You have excellent taste! ✨ 🍰 ✨
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Error [Errno 2] No such file or directory: '/home/jhartley/dropbox/jon-data/code/unfinished/gloopy/' while executing command python setup.py egg_info
Traceback (most recent call last):
File "/home/jhartley/.local/bin/pipenv", line 11, in <module>
sys.exit(cli())
File "/home/jhartley/.local/lib/python3.5/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/home/jhartley/.local/lib/python3.5/site-packages/pipenv/vendor/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/home/jhartley/.local/lib/python3.5/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/jhartley/.local/lib/python3.5/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/jhartley/.local/lib/python3.5/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/jhartley/.local/lib/python3.5/site-packages/pipenv/cli.py", line 1682, in install
do_lock(system=system, pre=pre)
File "/home/jhartley/.local/lib/python3.5/site-packages/pipenv/cli.py", line 1044, in do_lock
pre=pre
File "/home/jhartley/.local/lib/python3.5/site-packages/pipenv/utils.py", line 468, in resolve_deps
resolved_tree.update(resolver.resolve())
File "/home/jhartley/.local/lib/python3.5/site-packages/piptools/resolver.py", line 107, in resolve
has_changed, best_matches = self._resolve_one_round()
File "/home/jhartley/.local/lib/python3.5/site-packages/piptools/resolver.py", line 195, in _resolve_one_round
for dep in self._iter_dependencies(best_match):
File "/home/jhartley/.local/lib/python3.5/site-packages/piptools/resolver.py", line 262, in _iter_dependencies
for dependency in self.repository.get_dependencies(ireq):
File "/home/jhartley/.local/lib/python3.5/site-packages/piptools/repositories/pypi.py", line 145, in get_dependencies
self._dependencies_cache[ireq] = reqset._prepare_file(self.finder, ireq)
File "/home/jhartley/.local/lib/python3.5/site-packages/pipenv/patched/pip/req/req_set.py", line 518, in _prepare_file
abstract_dist.prep_for_dist()
File "/home/jhartley/.local/lib/python3.5/site-packages/pipenv/patched/pip/req/req_set.py", line 129, in prep_for_dist
self.req_to_install.run_egg_info()
File "/home/jhartley/.local/lib/python3.5/site-packages/pipenv/patched/pip/req/req_install.py", line 439, in run_egg_info
command_desc='python setup.py egg_info')
File "/home/jhartley/.local/lib/python3.5/site-packages/pipenv/patched/pip/utils/__init__.py", line 667, in call_subprocess
cwd=cwd, env=env)
File "/usr/lib/python3.5/subprocess.py", line 676, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1282, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: '/home/jhartley/dropbox/jon-data/code/unfinished/gloopy/'
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
pipenv Documentation
Pipenv will install the excellent Requests library and create a Pipfile for you in your project's directory. The Pipfile is used to track...
Read more >Running pipenv environment via $PATH symlink to ...
1 Answer 1 · Installed pyinstaller as dev dependency with pipenv install --dev pyinstaller ; · Launched pipenv shell in the project directory; ......
Read more >30371 (Use pipenv to create venv for development) - Sage Trac
I have now added a minimal pipfile including sage as an editable install. So running pipenv install results in a semi-workable virtual environment....
Read more >Frequently Encountered Pipenv Problems - Read the Docs
This is usually a result of mixing Pipenv with system packages. We strongly recommend installing Pipenv in an isolated environment. Uninstall all existing ......
Read more >('connection aborted.', filenotfounderror(2, 'no such file or ...
docker-compose Error: FileNotFoundError: [Errno 2] No such file or directory ... import requests from bs4 import BeautifulSoup as BS s = requests.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
great news! yeah we fixed that bug recently 😃
FWIW, yesterday my Pipfile had the erroneously lower-cased path in it (I don’t have a copy of that). I was deleting Pipfile* (and rmvirtualenv) and regenerated it like that a number of times. But today (in a new login) it’s looking fine to me: