我想在虚拟环境中安装Spacy。我用 python 3.9 创建了虚拟环境。激活了环境。根据Spacy教程当我尝试在虚拟环境中安装Spacy时,我收到如下错误
Requirement already satisfied: pip in d:\env39\lib\site-packages (21.2.4)
Collecting pip
Using cached pip-24.0-py3-none-any.whl (2.1 MB)
Requirement already satisfied: setuptools in d:\env39\lib\site-packages (58.1.0)
Collecting setuptools
Downloading setuptools-70.0.0-py3-none-any.whl (863 kB)
|████████████████████████████████| 863 kB 2.2 MB/s
Collecting wheel
Downloading wheel-0.43.0-py3-none-any.whl (65 kB)
|████████████████████████████████| 65 kB 1.9 MB/s
Installing collected packages: wheel, setuptools, pip
Attempting uninstall: setuptools
Found existing installation: setuptools 58.1.0
Uninstalling setuptools-58.1.0:
Successfully uninstalled setuptools-58.1.0
Attempting uninstall: pip
Found existing installation: pip 21.2.4
Uninstalling pip-21.2.4:
ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'd:\\env39\\scripts\\pip.exe'
Check the permissions.
我在Google上搜索发现我需要在命令中使用--user才能正确运行它。因此,我尝试了一下,得到了如下错误
然后我再次尝试使用相同的命令来安装 Spacy。现在情况如下
如何解决?