Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing local package with pipenv install '-e .' --dev no longer works. #1012

Closed
chrisphilip322 opened this issue Nov 1, 2017 · 6 comments

Comments

@chrisphilip322
Copy link

The feature described https://docs.pipenv.org/basics.html#editable-dependencies-e-g-e was broken in this commit kennethreitz@0a48fa0

In the most recent version of pipenv (8.3.1), pipenv install '-e .' --dev fails with a TypeError from this line https://github.com/kennethreitz/pipenv/blob/v8.3.1/pipenv/utils.py#L540

Since '.' is a directory and not a regular file, it fails the check on L539 os.path.isfile(req.path) and the Requirements object name is None when parsing this type of requirement which causes the exception to be raised.

Installing pipenv==8.2.7 resolved this issue for me.

@ipmb
Copy link

ipmb commented Nov 1, 2017

Full traceback:

$ pipenv install -e .
Installing -e .…
Traceback (most recent call last):
  File "/Users/pete/Library/Python/3.6/bin/pipenv", line 11, in <module>
    sys.exit(cli())
  File "/Users/pete/Library/Python/3.6/lib/python/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/pete/Library/Python/3.6/lib/python/site-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/pete/Library/Python/3.6/lib/python/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/pete/Library/Python/3.6/lib/python/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/pete/Library/Python/3.6/lib/python/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/pete/Library/Python/3.6/lib/python/site-packages/pipenv/cli.py", line 1869, in install
    converted = convert_deps_from_pip(package_name)
  File "/Users/pete/Library/Python/3.6/lib/python/site-packages/pipenv/utils.py", line 540, in convert_deps_from_pip
    os.path.isfile(req.name)) and not req.vcs:
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/genericpath.py", line 30, in isfile
    st = os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

@techalchemy
Copy link
Member

techalchemy commented Nov 1, 2017

@grets @ipmb thanks for the report. We are aware of this issue and have a fix coming. I'm going to go ahead and close this as a duplicate of #960 #939 #949 #914 #817 with a fix pending in #958:

  ◰³ tempenv-0fe31406509ec  ~/g/test-pipenv-dep   master +  pipenv install '-e .'
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project.
Creating a Pipfile for this project…
Installing -e .…
Obtaining file:///home/hawk/git/test-pipenv-dep
Installing collected packages: test-pipenv-dep
  Running setup.py develop for test-pipenv-dep
Successfully installed test-pipenv-dep

Adding -e . to Pipfile's [packages]…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (6fc905)!

@AlJohri
Copy link
Contributor

AlJohri commented Nov 8, 2017

ah, just ran into this as well

@AlJohri
Copy link
Contributor

AlJohri commented Nov 8, 2017

quick workaround - add "cjSj384E" = {path = ".", editable = true} to your Pipfile manually where cjSj384E is the hash of path to the current directory. you can get this hash from checking the currently virtualenv name pipenv --venv

@techalchemy
Copy link
Member

@AlJohri that's a nice workaround actually!

techalchemy added a commit to techalchemy/pipenv that referenced this issue Nov 14, 2017
@techalchemy
Copy link
Member

This is resolved in #958

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants