pipenv 2018.7.1 版本'module' object is not callable' 问题解决

简介:

当使用 pipenv 在安装依赖包时,出现如下问题,

> pipenv install
Pipfile.lock (ca72e7) out of date, updating to (c2d5f0)...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
python3.6/site-packages/pipenv/utils.py", line 402, in resolve_deps
    req_dir=req_dir
  File "/Users/helixcs/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pipenv/utils.py", line 250, in actually_resolve_deps
    req = Requirement.from_line(dep)
  File "/Users/helixcs/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 704, in from_line
    line, extras = _strip_extras(line) TypeError: 'module' object is not callable 

检查Python 环境版本。

pipenv 版本

  ~ pipenv --version
pipenv, version 2018.7.1

pip 版本

  ~ pip --version
pip 18.1 from /Users/helix/anaconda3/lib/python3.6/site-packages/pip (python 3.6)

python 版本

  ~ python -V
Python 3.6.3 :: Anaconda custom (64-bit)

参考此 issue, 原来是 pip 版本太高, pipenv 还不支持 18.1 版本,故需要把 pip 版本降级。

pip install 'pip==18.0'

再次运行 pipenv install

> pipenv install
Pipfile.lock (ca72e7) out of date, updating to (c2d5f0)...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
Installing dependencies from Pipfile.lock (c2d5f0)...
     ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 58/58 — 00:02:05
  

原文:https://iliangqunru.bitcron.com/post/2018/pipenv-2018.7.1-ban-ben-module-object-is-not-callable-wen-ti-jie-jue

目录
相关文章
|
PyTorch 算法框架/工具
Pytorch出现‘Tensor‘ object is not callable解决办法
Pytorch出现‘Tensor‘ object is not callable解决办法
429 0
Pytorch出现‘Tensor‘ object is not callable解决办法
|
6月前
|
机器学习/深度学习 自然语言处理 数据可视化
简单的知识图谱可视化+绘制nx.Graph()时报错TypeError: ‘_AxesStack‘ object is not callable
简单的知识图谱可视化+绘制nx.Graph()时报错TypeError: ‘_AxesStack‘ object is not callable
141 0
|
8月前
|
Python
str'object is not callable
str'object is not callable
216 1
|
TensorFlow 算法框架/工具
Tensorflow 出现 ‘Tensor‘ object is not callable解决办法
Tensorflow 出现 ‘Tensor‘ object is not callable解决办法
213 0
Tensorflow 出现 ‘Tensor‘ object is not callable解决办法
|
Python
TypeError: ‘XXXX‘ object is not callable问题的一种可能性
TypeError: ‘XXXX‘ object is not callable问题的一种可能性
230 0
TypeError: ‘XXXX‘ object is not callable问题的一种可能性
|
Python
Python错误:'tuple' object is not callable
Python错误:'tuple' object is not callable
185 0
|
Python
Python错误:'tuple' object is not callable
Python错误:'tuple' object is not callable
24 0
|
Python
Django 错误:TypeError at / 'bool' object is not callable
使用 Django自带的 auth 用户验证功能,编写函数,使用 is_authenticated 检查用户是否登录,结果报错:   TypeError at / 'bool' object is not callable   编写函数如下: def index(request, pid=None, del_pass=None): if request.
3207 0
|
Python
【Python】TypeError: 'module' object is not callable 原因分析
**原因分析: Python导入模块的方法有两种:import module 和 from module import,区别是前者所有导入的东西使用时需加上模块名的限定,而后者不要。** from bs4 import BeautifulSoup markup = "<b><!--Hey, buddy. Want to buy a used parse
1590 0
|
7月前
|
Java
【面试题精讲】Object类的常见方法有哪些?
【面试题精讲】Object类的常见方法有哪些?

热门文章

最新文章