python - Pipenv安装错误: Command "python setup.py egg_info" failed with error code 1 in

标签 python django installation pipenv

我最近转向使用 pipenv 并且在尝试安装软件包时不时出现以下错误:

$ pipenv lock --clear --verbose

pipenv.patched.notpip._internal.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in

$ pipenv install social-auth-core
 line 704, in from_line
line, extras = _strip_extras(line)
TypeError: 'module' object is not callable

$ python setup.py egg_info
(k, v) for k, v in attrs.items()
File "/home/user/.local/share/virtualenvs/django-app-VE-name/lib/python3.6/site-packages/setuptools/dist.py", line 367, in __init__ 
for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'):
AttributeError: module 'pkg_resources' has no attribute 'iter_entry_points'

错误的 github 页面没有帮助,谢谢

最佳答案

我认为这些可能是最新的 pipenv 中已修复的错误。您使用的是最新版本的 pipenv(以及 pip、setuptools 和 wheel)吗?

假设您正在使用 --user安装,您可以使用以下命令升级和/或检查:

$ pip install --user --upgrade --upgrade-strategy eager pipenv wheel
Requirement already up-to-date: pipenv in ./.local/lib/python3.6/site-packages (2018.11.26)
Requirement already up-to-date: wheel in ./.local/lib/python3.6/site-packages (0.32.3)
Requirement already up-to-date: setuptools>=36.2.1 in ./.local/lib/python3.6/site-packages (from pipenv) (40.6.3)
Requirement already up-to-date: virtualenv in ./.local/lib/python3.6/site-packages (from pipenv) (16.1.0)
Requirement already up-to-date: virtualenv-clone>=0.2.5 in ./.local/lib/python3.6/site-packages (from pipenv) (0.4.0)
Requirement already up-to-date: pip>=9.0.1 in ./.local/lib/python3.6/site-packages (from pipenv) (18.1)
Requirement already up-to-date: certifi in ./.local/lib/python3.6/site-packages (from pipenv) (2018.11.29)

注:这应该在您的虚拟环境之外运行,而不是在它被激活时运行。

关于python - Pipenv安装错误: Command "python setup.py egg_info" failed with error code 1 in,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53780525/

相关文章:

mysql - 在 CentOS 7 (x64) 中通过 bash shell 脚本安装 MySQL Community Server 5.7

installation - InnoSetup,如果选择任何任务则阻止安装

azure - tar : julia-xxx: Cannot create symlink to xxx: Operation not supported

python - 如何在 Django 或 SQL 中查询 Non Unique Together 值?

python - 在 django View 中按月份过滤

python - 当列表索引超出范围时插入错误消息

django - 在数据库中保存 celery 任务(用于重新运行)

python - 在带有 SP1 的 Windows 7 32 位上安装 Python 3.8

django - 使用变量中的字段名称更新 django 中的多对多字段

python - Django 2.0 |包含多个 urls conf 命名空间