如何通过Pip安装Pulp?

问题描述

我正在尝试在Windows 10计算机上使用CMD安装带有PIP的PULP。

C:\Windows\system32>python --version
Python 3.8.5

C:\Windows\system32>pip --version
pip 20.2.3 from c:\python38\lib\site-packages\pip (python 3.8)

使用pip install pulp时出现此错误:

    C:\Windows\system32>pip install pulp
Collecting pulp
  Using cached PuLP-2.3-py3-none-any.whl (40.6 MB)
Collecting amply>=0.1.2
  Using cached amply-0.1.2.tar.gz (26 kB)
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\python38\python.exe' 'c:\python38\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\user.name\AppData\Local\Temp\pip-build-env-ha8e4zco\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=42' wheel 'setuptools_scm[toml]>=3.4'
       cwd: None
  Complete output (42 lines):
  Traceback (most recent call last):
    File "c:\python38\lib\runpy.py",line 194,in _run_module_as_main
      return _run_code(code,main_globals,None,File "c:\python38\lib\runpy.py",line 87,in _run_code
      exec(code,run_globals)
    File "c:\python38\lib\site-packages\pip\__main__.py",line 26,in <module>
      sys.exit(_main())
    File "c:\python38\lib\site-packages\pip\_internal\cli\main.py",line 73,in main
      command = create_command(cmd_name,isolated=("--isolated" in cmd_args))
    File "c:\python38\lib\site-packages\pip\_internal\commands\__init__.py",line 104,in create_command
      module = importlib.import_module(module_path)
    File "c:\python38\lib\importlib\__init__.py",line 127,in import_module
      return _bootstrap._gcd_import(name[level:],package,level)
    File "<frozen importlib._bootstrap>",line 1014,in _gcd_import
    File "<frozen importlib._bootstrap>",line 991,in _find_and_load
    File "<frozen importlib._bootstrap>",line 975,in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>",line 671,in _load_unlocked
    File "<frozen importlib._bootstrap_external>",line 783,in exec_module
    File "<frozen importlib._bootstrap>",line 219,in _call_with_frames_removed
    File "c:\python38\lib\site-packages\pip\_internal\commands\install.py",line 17,in <module>
      from pip._internal.cli.req_command import RequirementCommand,with_cleanup
    File "c:\python38\lib\site-packages\pip\_internal\cli\req_command.py",line 16,in <module>
      from pip._internal.index.collector import LinkCollector
    File "c:\python38\lib\site-packages\pip\_internal\index\collector.py",line 14,in <module>
      from pip._vendor import html5lib,requests
    File "c:\python38\lib\site-packages\pip\_vendor\requests\__init__.py",line 125,in <module>
      from . import utils
    File "c:\python38\lib\site-packages\pip\_vendor\requests\utils.py",line 25,in <module>
      from . import certs
    File "c:\python38\lib\site-packages\pip\_vendor\requests\certs.py",line 15,in <module>
      from pip._vendor.certifi import where
    File "c:\python38\lib\site-packages\pip\_vendor\certifi\__init__.py",line 1,in <module>
      from .core import contents,where
    File "c:\python38\lib\site-packages\pip\_vendor\certifi\core.py",line 12,in <module>
      from importlib.resources import path as get_path,read_text
    File "c:\python38\lib\importlib\resources.py",line 11,in <module>
      from typing import Iterable,Iterator,Optional,Set,Union   # noqa: F401
    File "c:\python38\lib\site-packages\typing.py",line 1357,in <module>
      class Callable(extra=collections_abc.Callable,metaclass=CallableMeta):
    File "c:\python38\lib\site-packages\typing.py",line 1005,in __new__
      self._abc_registry = extra._abc_registry
  AttributeError: type object 'Callable' has no attribute '_abc_registry'
  ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python38\python.exe' 'c:\python38\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\user.name\AppData\Local\Temp\pip-build-env-ha8e4zco\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=42' wheel 'setuptools_scm[toml]>=3.4' Check the logs for full command output.

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...