Windows上的Pipenv:“模块"对象不可调用 [英] Pipenv on Windows: 'module' object is not callable
问题描述
我在Windows 10计算机上使用Pipenv遇到麻烦.最初,尝试运行pipenv install <module>
并遵循此答案时,我收到了超时错误,我禁用了Windows Defender.>
这消除了超时错误,然后似乎已成功在〜/.virtualenvs 中安装了该软件包,但是在创建 Pipfile.lock 时出现了一个错误. >:
Adding flask to Pipfile's [packages]...
Pipfile.lock not found, creating...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
File "C:\Users\Edgar\AppData\Roaming\Python\Python36\site-packages\pipenv\utils.py", line 402, in resolve_deps
req_dir=req_dir
File "C:\Users\Edgar\AppData\Roaming\Python\Python36\site-packages\pipenv\utils.py", line 250, in actually_resolve_deps
req = Requirement.from_line(dep)
File "C:\Users\Edgar\AppData\Roaming\Python\Python36\site-packages\pipenv\vendor\requirementslib\models\requirements.py", line 704, in from_line
line, extras = _strip_extras(line)
TypeError: 'module' object is not callable
我尝试安装requests
和flask
,但结果相同.
- python :Python 3.6.4 :: Anaconda,Inc.
- pip :来自c:\ users \ edgar \ anaconda3 \ lib \ site-packages \ pip(python 3.6)的pip 18.0
- pipenv :pipenv,版本2018.7.1
关于什么是问题/解决方案的任何线索?
最终解决了它.这是当前问题,在Windows中使用解决方法:
pipenv run python -m pip install -U pip==18.0
I'm having trouble using Pipenv on my Windows 10 machine. Initially, I got a timeout error while trying to run pipenv install <module>
and following this answer, I disabled Windows Defender.
That got rid of the timeout error and it then seems to successfully install the package at ~/.virtualenvs but I get an error when it comes to creating Pipfile.lock:
Adding flask to Pipfile's [packages]...
Pipfile.lock not found, creating...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
File "C:\Users\Edgar\AppData\Roaming\Python\Python36\site-packages\pipenv\utils.py", line 402, in resolve_deps
req_dir=req_dir
File "C:\Users\Edgar\AppData\Roaming\Python\Python36\site-packages\pipenv\utils.py", line 250, in actually_resolve_deps
req = Requirement.from_line(dep)
File "C:\Users\Edgar\AppData\Roaming\Python\Python36\site-packages\pipenv\vendor\requirementslib\models\requirements.py", line 704, in from_line
line, extras = _strip_extras(line)
TypeError: 'module' object is not callable
I've tried installing requests
and flask
, with the same results.
- python: Python 3.6.4 :: Anaconda, Inc.
- pip: pip 18.0 from c:\users\edgar\anaconda3\lib\site-packages\pip (python 3.6)
- pipenv: pipenv, version 2018.7.1
Any clues as to what is the problem/solution?
Finally solved it. This is current issue, with a workaround for Windows:
pipenv run python -m pip install -U pip==18.0
这篇关于Windows上的Pipenv:“模块"对象不可调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!