【发布时间】:2019-11-19 07:28:45
【问题描述】:
当我尝试 pip install gym 时,它给了我一个错误, 请帮忙 我正在 Windows 7 上安装
这是错误:
spyder 3.3.2 requires pyqt5<5.10; python_version >= "3", which is not installed.
Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\programdata\\anaconda3\\lib\\site-packages\\cloudpickle-0.6.1.dist-info\\installer'
Consider using the `--user` option or check the permissions.
全文摘录如下:
!pip install gym
Downloading https://files.pythonhosted.org/packages/9d/38/87aefd5388f6062267384b7e8f97dbc27c54b3e6137a5148b43d5c10890c/gym-0.13.1.tar.gz (1.6MB)
Requirement already satisfied: scipy in c:\programdata\anaconda3\lib\site-packages (from gym) (1.1.0)
Requirement already satisfied: numpy>=1.10.4 in c:\programdata\anaconda3\lib\site-packages (from gym) (1.15.4)
Requirement already satisfied: six in c:\programdata\anaconda3\lib\site-packages (from gym) (1.12.0)
Collecting pyglet<=1.3.2,>=1.2.0 (from gym)
Downloading https://files.pythonhosted.org/packages/1c/fc/dad5eaaab68f0c21e2f906a94ddb98175662cc5a654eee404d59554ce0fa/pyglet-1.3.2-py2.py3-none-any.whl (1.0MB)
Collecting cloudpickle~=1.2.0 (from gym)
Using cached https://files.pythonhosted.org/packages/09/f4/4a080c349c1680a2086196fcf0286a65931708156f39568ed7051e42ff6a/cloudpickle-1.2.1-py2.py3-none-any.whl
Requirement already satisfied: future in c:\programdata\anaconda3\lib\site-packages (from pyglet<=1.3.2,>=1.2.0->gym) (0.17.1)
Building wheels for collected packages: gym
Running setup.py bdist_wheel for gym: started
Running setup.py bdist_wheel for gym: finished with status 'done'
Stored in directory: C:\Users\INTEL\AppData\Local\pip\Cache\wheels\95\14\8e\b4f5c72600f654312b40c0844d4c23f146f291c48ac7a5df62
Successfully built gym
Installing collected packages: pyglet, cloudpickle, gym
Found existing installation: pyglet 1.4.1
Uninstalling pyglet-1.4.1:
Successfully uninstalled pyglet-1.4.1
Found existing installation: cloudpickle 0.6.1
Uninstalling cloudpickle-0.6.1:
spyder 3.3.2 requires pyqt5<5.10; python_version >= "3", which is not installed.
Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\programdata\\anaconda3\\lib\\site-packages\\cloudpickle-0.6.1.dist-info\\installer'
Consider using the `--user` option or check the permissions.```
【问题讨论】:
-
尝试从管理命令提示符运行,它无法访问您的 Anaconda 目录下的包。如果您没有在系统上以管理员身份登录,也可以这样做。
-
另外确保您使用的是正确的 Python 版本,脚本说其中一个组件需要 Python 版本大于或等于 3 并且没有找到。
-
@BenPersonick 感谢兄弟的帮助,当我以管理员身份打开命令提示符时它起作用了
-
很高兴能提供帮助,我会将以上内容作为 Q 的答案发布,以确保其他有问题的人能够找到答案
标签: python pip jupyter-notebook reinforcement-learning openai-gym