我在系统上安装了Anaconda 1.6.2
,它使用, 。
我需要安装,这不是.
我无法运行,因为尚未为其创建注册表项,并且无法识别 Python 版本。
所以,我尝试从源代码安装。我最初想做的是按照这里的说明创建一个 conda 包http://www.continuum.io/blog/conda根据这些说明,首先从源代码安装包(在这种情况下为 pygame),然后conda 包被创建。但是,我在 pygame 安装中失败了。
在运行文件时,会引发运行时错误。Python 2.7.5
Windows 7 64-bit
Pygame 1.9.1
conda repository
Windows installer
Anaconda
Python
.msi
Pygame
setup.py
("python setup.py install")
"mingw32: required environment variable MINGW_ROOT_DIRECTORY not set"
设置环境变量后,我再次运行设置,这次运行时错误变为“依赖项链接到 Python 2.7 的错误 C 运行时”。
错误:
WARNING, DLL for smpeg library not found.
WARNING, DLL for tiff library not found.
WARNING, DLL for SDL_ttf library not found.
WARNING, DLL for SDL_image library not found.
WARNING, DLL for vorbisfile library not found.
WARNING, DLL for jpeg library not found.
WARNING, DLL for vorbis library not found.
WARNING, DLL for SDL_mixer library not found.
WARNING, DLL for png library not found.
WARNING, DLL for SDL library not found.
WARNING, DLL for ogg library not found.
WARNING, DLL for z library not found.
WARNING, DLL for portmidi library not found.
running install
running build
running build_py
running build_ext
Traceback (most recent call last):
File "setup.py", line 491, in <module>
setup(**PACKAGEDATA)
File "C:\Anaconda\lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "C:\Anaconda\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Anaconda\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Anaconda\lib\distutils\command\install.py", line 563, in run
self.run_command('build')
File "C:\Anaconda\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Anaconda\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Anaconda\lib\distutils\command\build.py", line 127, in run
self.run_command(cmd_name)
File "C:\Anaconda\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Anaconda\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "setup.py", line 352, in run
sys.version_info[:2])
RuntimeError: The dependencies are linked to the wrong C runtime for Python 2.7
distutils.cfg
\Anaconda\Lib\distutils 中的文件读取
[build]
compiler = mingw32
请告诉我我需要做什么来安装Pygame with Anaconda
. 我无法找到有关此组合的任何信息(几乎没有)。我只想补充一点,当我安装 Python 2.7.5 时,Pygame 最初是可以工作的。当我卸载原来的 Python 安装并移至 Anaconda 时,问题出现了。
谢谢!