我在Windows 10,64位上使用python 2.7,32位。每当我尝试通过pip install psychopy
安装心理模块时,我都会得到下面提到的错误。我无法理解问题所在。我还对环境变量进行了更改,将anconda bin和anaconda脚本设置为最高优先级。我在过去8个月里运行相同的程序,从来没有遇到过任何问题。我正在尝试在新PC中安装所有内容并在我的新旧PC中出现此类错误。如何解决这个问题?
Exception:
Traceback (most recent call last):
File "c:\users\ravikumar.mevada\anaconda2\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "c:\users\ravikumar.mevada\anaconda2\lib\site-packages\pip\commands\install.py", line 342, in run
prefix=options.prefix_path,
File "c:\users\ravikumar.mevada\anaconda2\lib\site-packages\pip\req\req_set.py", line 784, in install
**kwargs
File "c:\users\ravikumar.mevada\anaconda2\lib\site-packages\pip\req\req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "c:\users\ravikumar.mevada\anaconda2\lib\site-packages\pip\req\req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "c:\users\ravikumar.mevada\anaconda2\lib\site-packages\pip\wheel.py", line 345, in move_wheel_files
clobber(source, lib_dir, True)
File "c:\users\ravikumar.mevada\anaconda2\lib\site-packages\pip\wheel.py", line 323, in clobber
shutil.copyfile(srcfile, destfile)
File "c:\users\ravikumar.mevada\anaconda2\lib\shutil.py", line 97, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: 'c:\\users\\ravikumar.mevada\\anaconda2\\Lib\\site-packages\\win32\\win32api.pyd'
答案 0 :(得分:0)
您的用户看起来没有在系统中安装软件包的权限(适用于所有用户)。以下是解决此问题的方法:
在命令提示符下,您可以仅为您的用户安装软件包,如下所示:
pip install <package> --user
<强> OR 强>
您可以按照以下步骤以管理员身份安装软件包:
Run This Program As An Administrator
选项以管理员身份运行命令提示符。pip install <package>
答案 1 :(得分:0)
右键单击 - >打开命令提示符。之后以管理员身份打开
输入:
py -2.7 -m pip help
py -2.7 -m pip install psychopy
OR
conda create -n py27 python=2.7 anaconda