小编Dan*_*iel的帖子

MacOS上的Pipenv问题"TypeError:'module'对象不可调用"

我开始尝试获得一个工作的pipenv,但是在我的Mac上,似乎我的Python环境有点搞砸了.我在这篇文章之后删除了OS X python ,并使用brew安装了python2.7和python3.7.但是现在当尝试使用pipenv(2.7)来创建virtualenv和pipfile时,我在锁定pacakges时不断收到有关python 3.7的错误:

$ pipenv --python=/usr/local/bin/python install pynetbox ipaddress
Virtualenv already exists!
Removing existing virtualenv...
Creating a virtualenv for this project...
Pipfile: /Users/daniel/scripts/netbox/Pipfile

...

adding ipaddress to Pipfile's [packages]...
Pipfile.lock not found, creating...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
c/lib/python3.7/site-packages/pipenv/utils.py", line 250, in actually_resolve_deps
    req = Requirement.from_line(dep)
  File "/usr/local/Cellar/pipenv/2018.7.1/libexec/lib/python3.7/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 704, in from_line
    line, extras = _strip_extras(line)
TypeError: 'module' object is not callable
/usr/local/Cellar/pipenv/2018.7.1/libexec/lib/python3.7/site-packages/pipenv/_compat.py:113: ResourceWarning: Implicitly cleaning up <TemporaryDirectory '/var/folders/pc/hlxw3whn3cl1x3h45ll2m8gw0000gs/T/pipenv-TYWa8Y-requirements'>
  warnings.warn(warn_message, ResourceWarning)
Run Code Online (Sandbox Code Playgroud)

我重新安装了PIP和python几次,没有运气.任何想法将不胜感激.我肯定通过python可能只是在一些糟糕的状态:(

python macos pipenv

23
推荐指数
2
解决办法
5161
查看次数

标签 统计

macos ×1

pipenv ×1

python ×1