You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I forgot to configure setup.py in a new project proj1, then tried to do pipenv install -e file:///path/to/proj1, from under another project directory. The command returned with a FileNotFoundError: [Errno 2] No such file or directory: '/path/to/proj1' error, and deleted the entire proj1 directory.
Expected result
I would have expected an error message along the lines of "setup.py is not found in proj1".
Actual result
➜ workspace/pipenv-test/proj2 pipenv install -e file://$HOME/workspace/pipenv-test/proj1
Installing -e file:///home/jingxue/workspace/pipenv-test/proj1…
Traceback (most recent call last):
File "/home/jingxue/.local/bin/pipenv", line 8, in <module>
sys.exit(cli())
File "/home/jingxue/.local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/jingxue/.local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/jingxue/.local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/jingxue/.local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/jingxue/.local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/jingxue/.local/lib/python3.7/site-packages/pipenv/vendor/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/home/jingxue/.local/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/jingxue/.local/lib/python3.7/site-packages/pipenv/vendor/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/jingxue/.local/lib/python3.7/site-packages/pipenv/cli/command.py", line 254, in install
editable_packages=state.installstate.editables,
File "/home/jingxue/.local/lib/python3.7/site-packages/pipenv/core.py", line 1909, in do_install
pkg_requirement = Requirement.from_line(pkg_line)
File "/home/jingxue/.local/lib/python3.7/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 1092, in from_line
r = FileRequirement.from_line(line_with_prefix, extras=extras)
File "/home/jingxue/.local/lib/python3.7/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 548, in from_line
return cls.create(**arg_dict)
File "/home/jingxue/.local/lib/python3.7/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 477, in create
setup_info = SetupInfo.from_ireq(ireq)
File "/home/jingxue/.local/lib/python3.7/site-packages/pipenv/vendor/requirementslib/models/setup_info.py", line 422, in from_ireq
progress_bar="off",
File "/home/jingxue/.local/lib/python3.7/site-packages/pipenv/patched/notpip/_internal/download.py", line 824, in unpack_url
unpack_file_url(link, location, download_dir, hashes=hashes)
File "/home/jingxue/.local/lib/python3.7/site-packages/pipenv/patched/notpip/_internal/download.py", line 700, in unpack_file_url
shutil.copytree(link_path, location, symlinks=True)
File "/usr/lib/python3.7/shutil.py", line 318, in copytree
names = os.listdir(src)
FileNotFoundError: [Errno 2] No such file or directory: '/home/jingxue/workspace/pipenv-test/proj1'
I've been able to succesfully reproduce your bug with the below Dockerfile, I think. The good news is that the pipenv master branch doesn't appear to have this bug (as you can see by switching between the versions in the Dockerfile). So until #3369, It seems like installing pipenv from github is the way to go...
FROM ubuntu
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
RUN apt-get update && apt-get -y install
python3
python3-pip
git
@jingxue Sincere apologies for any trouble this might have caused you :| just so you are aware, pip install --upgrade --pre pipenv will get you a version of pipenv that does not cause this issue.
I'll close this for now as it's been fixed on master, even though it's not yet released -- the official release will be out soon. Thanks for reporting this and for your patience!
Issue description
I forgot to configure setup.py in a new project proj1, then tried to do
pipenv install -e file:///path/to/proj1
, from under another project directory. The command returned with aFileNotFoundError: [Errno 2] No such file or directory: '/path/to/proj1'
error, and deleted the entire proj1 directory.Expected result
I would have expected an error message along the lines of "setup.py is not found in proj1".
Actual result
pipenv support file attached.
support.txt
The text was updated successfully, but these errors were encountered: