python - Pipenv TypeError:“模块”对象不可调用,锁定包
问题描述
大家好,我是 python、pip 和虚拟环境的新手:
我试图以这种方式安装 pygments:
我移动到项目的目录:
然后 :
pipenv install pygments
正在安装软件包,但我认为锁定软件包存在问题。
结果如下:
Installing pygments...
Collecting pygments
Using cached
Installing collected packages: pygments
Successfully installed pygments-2.2.0
https://files.pythonhosted.org/packages/02/ee/b6e02dc6529e82b75bb06823ff7
005b141037cb1416b10c6f00fc419dca/Pygments-2.2.0-py2.py3-none-any.whl
Adding pygments to Pipfile's [packages]...
Pipfile.lock (a65489) out of date, updating to (688642)...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
lib/python3.7/site-packages/pipenv/utils.py", line 402, in resolve_deps
req_dir=req_dir
File "/usr/local/Cellar/pipenv/2018.7.1/libexec/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
解决方案
我也有同样的问题,我也遇到过这个问题,看来Python3.6会出现这个问题。
我的点子文件:
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
pyinstaller = "*"
[dev-packages]
[requires]
python_version = "3.6"
推荐阅读
- sql - 如何在 PostgreSQL 中将数字转换为月份名称?
- java - 保证消息异步传递
- excel - 将值从一个工作表填充到另一个工作表
- java - 让我的矩形随机从我的屏幕上掉下来?
- python - 从父类别 django rest 获取所有产品
- ios - 今天小部件中的自定义视图相互堆叠,而不是一个在另一个下
- python - 为其他 python 版本安装库包
- ruby-on-rails - rails如何在bash中执行
- reactjs - React TypeScript:使用 useReducer 时出现 TS 错误
- javascript - webflow 平滑滚动错误 chrome