在Anacodna里使用pip安装包时报错:

  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\tachengji\AppData\Local\Temp\pip-install-daot_esj\monotonic-align_fcb90b94a45a470988f63fd03753128f\setup.py", line 2, in <module>
          from Cython.Build import cythonize
      ModuleNotFoundError: No module named 'Cython'
      [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.

经查找,解决过程如下:

pip install cython

报错:
image

python3.8 -m pip install cython

报错:
image-1676884366734

python -m pip install cython

报错443,网络原因
image-1676884452631

python -m pip install cython -i https://pypi.tuna.tsinghua.edu.cn/simple

成功,问题解决:
image-1676884514802

Q.E.D.