首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >pip安装无法生成依赖项,在setup.py egg_info失败。

pip安装无法生成依赖项,在setup.py egg_info失败。
EN

Stack Overflow用户
提问于 2022-07-03 12:21:31
回答 1查看 3.3K关注 0票数 0

早些时候,当我第一次看到这种错误时,我正试图安装jupyter笔记本,但是当我尝试从命令提示符打开jupyter笔记本时,尽管出错,它仍然正常工作。所以,我忽略了它。但是,现在它甚至没有安装熊猫。我试着安装unroll,但是它显示了相同类型的错误。我也尝试过使用pip3而不是pip来安装。

代码语言:javascript
运行
复制
C:\Users\kumar>pip install unroll
Collecting unroll
Using cached unroll-0.1.0.tar.gz (7.3 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [32 lines of output]
  Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.14.tar.gz
  Traceback (most recent call last):
    File "C:\msys64\mingw64\lib\python3.9\site-packages\ez_setup.py", line 143, in use_setuptools
      raise ImportError
  ImportError

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "C:\Users\kumar\AppData\Local\Temp\pip-install-6homm6dq\unroll_6700898ee7fe4673888ca58fbca3ae45\setup.py", line 2, in <module>
      ez_setup.use_setuptools()
    File "C:\msys64\mingw64\lib\python3.9\site-packages\ez_setup.py", line 145, in use_setuptools
      return _do_download(version, download_base, to_dir, download_delay)
    File "C:\msys64\mingw64\lib\python3.9\site-packages\ez_setup.py", line 123, in _do_download
      tarball = download_setuptools(version, download_base,
    File "C:\msys64\mingw64\lib\python3.9\site-packages\ez_setup.py", line 193, in download_setuptools
      src = urlopen(url)
    File "C:\msys64\mingw64\lib\python3.9\urllib\request.py", line 214, in urlopen
      return opener.open(url, data, timeout)
    File "C:\msys64\mingw64\lib\python3.9\urllib\request.py", line 523, in open
      response = meth(req, response)
    File "C:\msys64\mingw64\lib\python3.9\urllib\request.py", line 632, in http_response
      response = self.parent.error(
    File "C:\msys64\mingw64\lib\python3.9\urllib\request.py", line 561, in error
      return self._call_chain(*args)
    File "C:\msys64\mingw64\lib\python3.9\urllib\request.py", line 494, in _call_chain
      result = func(*args)
    File "C:\msys64\mingw64\lib\python3.9\urllib\request.py", line 641, in http_error_default
      raise HTTPError(req.full_url, code, msg, hdrs, fp)
  urllib.error.HTTPError: HTTP Error 403: SSL is required
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.






C:\Users\kumar>pip install pandas
Collecting pandas
Using cached pandas-1.4.3.tar.gz (4.9 MB)
Installing build dependencies ... error
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [71 lines of output]
  Collecting setuptools>=51.0.0
    Using cached setuptools-62.6.0-py3-none-any.whl (1.2 MB)
  Collecting wheel
    Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
  Collecting Cython<3,>=0.29.24
    Using cached Cython-0.29.30-py2.py3-none-any.whl (985 kB)
  Collecting oldest-supported-numpy>=0.10
    Using cached oldest_supported_numpy-2022.5.28-py3-none-any.whl (3.9 kB)
  Collecting numpy==1.19.3
    Using cached numpy-1.19.3.zip (7.3 MB)
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Getting requirements to build wheel: finished with status 'error'
    error: subprocess-exited-with-error

    Getting requirements to build wheel did not run successfully.
    exit code: 1

    [40 lines of output]
    Traceback (most recent call last):
      File "C:\Users\kumar\AppData\Local\Temp\tmp6grceh36_in_process.py", line 363, in <module>
        main()
      File "C:\Users\kumar\AppData\Local\Temp\tmp6grceh36_in_process.py", line 345, in main
        json_out['return_val'] = hook(**hook_input['kwargs'])
      File "C:\Users\kumar\AppData\Local\Temp\tmp6grceh36_in_process.py", line 124, in get_requires_for_build_wheel
        backend = _build_backend()
      File "C:\Users\kumar\AppData\Local\Temp\tmp6grceh36_in_process.py", line 89, in _build_backend
        obj = import_module(mod_path)
      File "C:\msys64\mingw64\lib\python3.9\importlib\__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
      File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
      File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
      File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
      File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
      File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 850, in exec_module
      File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
      File "C:\Users\kumar\AppData\Local\Temp\pip-build-env-888p6dt5\overlay\lib\python3.9\site-packages\setuptools\__init__.py", line 253, in <module>
        monkey.patch_all()
      File "C:\Users\kumar\AppData\Local\Temp\pip-build-env-888p6dt5\overlay\lib\python3.9\site-packages\setuptools\monkey.py", line 101, in patch_all
        patch_for_msvc_specialized_compiler()
      File "C:\Users\kumar\AppData\Local\Temp\pip-build-env-888p6dt5\overlay\lib\python3.9\site-packages\setuptools\monkey.py", line 164, in patch_for_msvc_specialized_compiler
        patch_func(*msvc9('find_vcvarsall'))
      File "C:\Users\kumar\AppData\Local\Temp\pip-build-env-888p6dt5\overlay\lib\python3.9\site-packages\setuptools\monkey.py", line 151, in patch_params
        mod = import_module(mod_name)
      File "C:\msys64\mingw64\lib\python3.9\importlib\__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
      File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
      File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 850, in exec_module
      File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
      File "C:\Users\kumar\AppData\Local\Temp\pip-build-env-888p6dt5\overlay\lib\python3.9\site-packages\setuptools\_distutils\msvc9compiler.py", line 295, in <module>
        raise DistutilsPlatformError("VC %0.1f is not supported by this module" % VERSION)
    distutils.errors.DistutilsPlatformError: VC 6.0 is not supported by this module
    [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
  error: subprocess-exited-with-error

  Getting requirements to build wheel did not run successfully.
  exit code: 1

  See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

我不知道为什么pip突然停止工作,我已经尝试更新pip到最新版本,这表明需求已经满足。我也尝试过安装最新版本的ez-安装,安装工具和车轮。

代码语言:javascript
运行
复制
C:\Users\kumar>pip list
Package    Version
---------- -------
ez-setup   0.9
pip        22.1.2
setuptools 62.6.0
wheel      0.37.1
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-07-31 16:14:27

好的,我试着更新visual studio,但是更新在特定的时刻一次又一次失败。后来,我做了一个窗口重置,这一次,我安装的所有软件包,在复位后都在工作,并被列在pip列表下,我还可以下载熊猫。我想由于mysys也包含python,当我为c++安装mysys时,mysys会自动在我的计算机上安装python3.10,这导致了这种矛盾,因为这两条python都是不同版本的,所以我的pc开始使用随mysys一起出现的pip,早些时候我没有意识到这一点,因为除了基本安装命令之外,我不太知道pip的工作,我认为pip列表不显示手动安装的软件包,直到现在我在重置pc后才运行pip列表。

代码语言:javascript
运行
复制
C:\Users\kumar>pip list
Package              Version
-------------------- -----------
argon2-cffi          21.3.0
argon2-cffi-bindings 21.2.0
asttokens            2.0.5
attrs                22.1.0
backcall             0.2.0
beautifulsoup4       4.11.1
bleach               5.0.1
certifi              2022.6.15
cffi                 1.15.1
charset-normalizer   2.1.0
colorama             0.4.5
cycler               0.11.0
debugpy              1.6.2
decorator            5.1.1
defusedxml           0.7.1
entrypoints          0.4
executing            0.9.1
fastjsonschema       2.16.1
fonttools            4.34.4
idna                 3.3
ipykernel            6.15.1
ipython              8.4.0
ipython-genutils     0.2.0
ipywidgets           7.7.1
jedi                 0.18.1
Jinja2               3.1.2
joblib               1.1.0
jsonschema           4.8.0
jupyter              1.0.0
jupyter-client       7.3.4
jupyter-console      6.4.4
jupyter-core         4.11.1
jupyterlab-pygments  0.2.2
jupyterlab-widgets   1.1.1
kiwisolver           1.4.4
MarkupSafe           2.1.1
matplotlib           3.5.2
matplotlib-inline    0.1.3
mistune              0.8.4
nbclient             0.6.6
nbconvert            6.5.0
nbformat             5.4.0
nest-asyncio         1.5.5
notebook             6.4.12
numpy                1.23.1
packaging            21.3
pandas               1.4.3
pandocfilters        1.5.0
parso                0.8.3
pickleshare          0.7.5
Pillow               9.2.0
pip                  22.2
prometheus-client    0.14.1
prompt-toolkit       3.0.30
psutil               5.9.1
pure-eval            0.2.2
pycparser            2.21
Pygments             2.12.0
pyparsing            3.0.9
pyrsistent           0.18.1
python-dateutil      2.8.2
pytz                 2022.1
pywin32              304
pywinpty             2.0.6
pyzmq                23.2.0
qtconsole            5.3.1
QtPy                 2.1.0
requests             2.28.1
scikit-learn         1.1.1
scipy                1.9.0
Send2Trash           1.8.0
setuptools           56.0.0
six                  1.16.0
soupsieve            2.3.2.post1
stack-data           0.3.0
terminado            0.15.0
threadpoolctl        3.1.0
tinycss2             1.1.1
tornado              6.2
tqdm                 4.64.0
traitlets            5.3.0
urllib3              1.26.11
wcwidth              0.2.5
webencodings         0.5.1
widgetsnbextension   3.6.1

正如您所看到的,我上面发布的pip列表几乎没有包含任何包,而我已经安装了numpy、scikit-learn、requests、selenium和其他几个包。对于任何新手来说,首先要检查一下你的电脑是否有两种不同版本的python,因为这是错误的原因。我要感谢大家花时间来帮助我。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72846459

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档