Python: Could not install packages due to an OSError: [Errno



我尝试使用pip安装sklearn,收到以下错误消息:

ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory:
'C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\jedi\third_party\django-stubs\django-stubs\contrib\contenttypes\management\commands\remove_stale_contenttypes.pyi'

我试图安装jupyter

尝试使用pip3 install sklearnpip install -U pip

Try with:

pip install scikit-learn

It will work.

对我来说,这是260个字符的文件路径限制(python安装程序最后警告我,但我没有足够注意:)。我按照https://www.howtogeek.com/266621/how-to-make-windows-10-accept-file-paths-over-260-characters/更改了它,然后安装了jupyter,之后没有任何问题

相关内容

最新更新