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.

`pipenv install -e .` fails with “stat: can't specify None for path argument”

See original GitHub issue

This happens when I run pipenv install -e . in an empty directory:

$ mkdir etiusrantesiunateruinate
$ cd etiusrantesiunateruinate
$ pipenv install -e .
Creating a virtualenv for this project…
⠋Using base prefix '/usr'
New python executable in /home/antoine/.local/share/virtualenvs/etiusrantesiunateruinate-Qd-Qq2kN/bin/python3
Also creating executable in /home/antoine/.local/share/virtualenvs/etiusrantesiunateruinate-Qd-Qq2kN/bin/python
Installing setuptools, pip, wheel...done.

Virtualenv location: /home/antoine/.local/share/virtualenvs/etiusrantesiunateruinate-Qd-Qq2kN
Creating a Pipfile for this project…
Installing -e .…
Traceback (most recent call last):
  File "/home/antoine/.local/bin//pipenv", line 11, in <module>
    sys.exit(cli())
  File "/home/antoine/.local/lib/python3.5/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/antoine/.local/lib/python3.5/site-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/antoine/.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/antoine/.local/lib/python3.5/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/antoine/.local/lib/python3.5/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/antoine/.local/lib/python3.5/site-packages/pipenv/cli.py", line 1880, in install
    converted = convert_deps_from_pip(package_name)
  File "/home/antoine/.local/lib/python3.5/site-packages/pipenv/utils.py", line 547, in convert_deps_from_pip
    os.path.isfile(req.name)) and not req.vcs:
  File "/usr/lib/python3.5/genericpath.py", line 30, in isfile
    st = os.stat(path)
TypeError: stat: can't specify None for path argument

Environment

$ cat /etc/debian_version 
buster/sid
$ python3 -V
Python 3.5.4
$ pipenv --version
pipenv, version 8.3.2

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
techalchemycommented, Nov 6, 2017

@motet-a er sorry,. I responded before I had my coffee this morning. You can’t pipenv install -e . in an empty directory because there is nothing to install. This is the same as if you pip install -e .. Both commands can only install a directory with a setup.py file, aka a python package. In this case it is not an argument parsing issue, it is an issue with not having something to install.

pipenv install must be passed either a package to install, or nothing (if there is a Pipfile in your directory already). There is an additional bug that affects installing local paths, but that doesn’t impact -e .

It is on our to-do list to improve the error messaging on this.

 ~  mkdir /tmp/test
 ~  cd /tmp/test
 /t/test  pip install -e .
Directory '.' is not installable. File 'setup.py' not found.
0reactions
techalchemycommented, Nov 22, 2017

@wooyek your issue is not the same as this one but is a duplicate of #1104 #1028 #1012 #945 #939 and all the way back to #540. It is fixed in master by #958 and #1095 and you can use this workaround if you need: https://github.com/kennethreitz/pipenv/issues/1012#issuecomment-342898222

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

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