我无法在我的python3.4.2安装中安装Pygame,我不知道为什么。我怀疑这可能是因为我的64位Win7桌面上有3个不同的Python版本。
所以我的主要问题是:如何告诉Pygame(或pip)在Python 3.4.2中安装PyGame而不是Anaconda的3.4.1
我的第二个问题是如何让iPython(Anaconda)从Python34目录中使用3.4.2而不是Anaconda的发行版?
我得到的错误就是这个,这似乎表明它正在尝试安装在Anaconda目录而不是Python34目录中 以下是安装后我的pip.log文件的内容:
C:\Anaconda3\Scripts\pip-script.py run on 05/28/15 15:09:06
Unpacking c:\python34\scripts\pygame-1.9.2a0-cp34-none-win_amd64.whl
Installing collected packages: pygame
Cleaning up...
Exception:
Traceback (most recent call last):
File "C:\Anaconda3\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "C:\Anaconda3\lib\site-packages\pip\commands\install.py", line 283, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "C:\Anaconda3\lib\site-packages\pip\req.py", line 1435, in install
requirement.install(install_options, global_options, *args, **kwargs)
File "C:\Anaconda3\lib\site-packages\pip\req.py", line 671, in install
self.move_wheel_files(self.source_dir, root=root)
File "C:\Anaconda3\lib\site-packages\pip\req.py", line 901, in move_wheel_files
pycompile=self.pycompile,
File "C:\Anaconda3\lib\site-packages\pip\wheel.py", line 215, in move_wheel_files
clobber(source, lib_dir, True)
File "C:\Anaconda3\lib\site-packages\pip\wheel.py", line 209, in clobber
shutil.copy2(srcfile, destfile)
File "C:\Anaconda3\lib\shutil.py", line 244, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "C:\Anaconda3\lib\shutil.py", line 108, in copyfile
with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: 'C:\\Anaconda3\\Lib\\site-packages\\pygame\\base.pyd'
这是我的PATH变量:
我有3种不同的Python安装:
我下载了pygame-1.9.2a0-cp34-none-win_amd64.whl 将其复制到C:\ Python34 \ Scripts 打开Windows PowerShell 导航到C:\ Python34 \ Scripts 运行命令
pip install pygame-1.9.2a0-cp34-none-win_amd64.whl
这产生了以下输出:
Unpacking c:\python34\scripts\pygame-1.9.2a0-cp34-none-win_amd64.
Installing collected packages: pygame
Cleaning up...
Exception:
Traceback (most recent call last):
File "C:\Anaconda3\lib\site-packages\pip\basecommand.py", line
status = self.run(options, args)
File "C:\Anaconda3\lib\site-packages\pip\commands\install.py",
requirement_set.install(install_options, global_options, root
File "C:\Anaconda3\lib\site-packages\pip\req.py", line 1435, in
requirement.install(install_options, global_options, *args, *
File "C:\Anaconda3\lib\site-packages\pip\req.py", line 671, in
self.move_wheel_files(self.source_dir, root=root)
File "C:\Anaconda3\lib\site-packages\pip\req.py", line 901, in
pycompile=self.pycompile,
File "C:\Anaconda3\lib\site-packages\pip\wheel.py", line 215, i
clobber(source, lib_dir, True)
File "C:\Anaconda3\lib\site-packages\pip\wheel.py", line 209, i
shutil.copy2(srcfile, destfile)
File "C:\Anaconda3\lib\shutil.py", line 244, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "C:\Anaconda3\lib\shutil.py", line 108, in copyfile
with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: 'C:\\Anaconda3\\Li
Storing debug log for failure in C:\Users\Les Paul\pip\pip.log