[英]No module named 'distutils.command.bdist_msi'
在 Pycharm (Windows 11) 中,我建立了一個包含一行的基本項目:
import pycurl
環境為Virtualenv,基本解釋器路徑為C:\Users\strat\AppData\Local\Programs\Python311\python.exe
當然,由於未安裝模塊,我得到:
Traceback (most recent call last):
File "C:\Users\strat\PycharmProjects\pythonProject3\main.py", line 6, in <module>
import pycurl
ModuleNotFoundError: No module named 'pycurl'
Process finished with exit code 1
所以我嘗試安裝它,就像我在 Linux 中通常做的那樣:
pip install pycurl
但我得到:
Collecting pycurl
Using cached pycurl-7.45.1.tar.gz (233 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [9 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\strat\AppData\Local\Temp\pip-install-7dqnopvz\pycurl_f564efcc68fa4b198200e92ae58e8c8b\setup.py", line 954, in <module>
setup_args['cmdclass'] = {'bdist_msi': get_bdist_msi_version_hack()}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\strat\AppData\Local\Temp\pip-install-7dqnopvz\pycurl_f564efcc68fa4b198200e92ae58e8c8b\setup.py", line 594, in get_bdist_msi_version_hack
from distutils.command.bdist_msi import bdist_msi
ModuleNotFoundError: No module named 'distutils.command.bdist_msi'
[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.
這個錯誤的根源是什么? 據我了解, distutils
在棄用后將被刪除,但是,作為圖書館的簡單用戶,我該怎么辦?
我有一個類似的問題。 我的解決方案是:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.