Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/285.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 在virtualenv中安装pygame时出现问题_Python_Powershell - Fatal编程技术网

Python 在virtualenv中安装pygame时出现问题

Python 在virtualenv中安装pygame时出现问题,python,powershell,Python,Powershell,我正在尝试在windows上的virtualenvs中安装pygame(我使用powershell VirtualEnvrapper)。 但当我运行pip install hg+时,它会失败,并出现以下日志: ------------------------------------------------------------ C:\Users\Marci\.virtualenvs\pygame\Scripts\pip run on 05/22/15 14:39:29 Downloading/

我正在尝试在windows上的virtualenvs中安装pygame(我使用powershell VirtualEnvrapper)。 但当我运行pip install hg+时,它会失败,并出现以下日志:

------------------------------------------------------------
C:\Users\Marci\.virtualenvs\pygame\Scripts\pip run on 05/22/15 14:39:29
Downloading/unpacking hg+http://bitbucket.org/pygame/pygame
  Cloning hg http://bitbucket.org/pygame/pygame to c:\users\marci\appdata\local\temp\pip-fyauuh-build
  Found command 'hg' at 'C:\\Program Files\\TortoiseHg\\hg.exe'
  Running command "C:\Program Files\TortoiseHg\hg.exe" clone --noupdate -q http://bitbucket.org/pygame/pygame c:\users\marci\appdata\local\temp\pip-fyauuh-build
  Running command "C:\Program Files\TortoiseHg\hg.exe" update -q
  Running setup.py (path:c:\users\marci\appdata\local\temp\pip-fyauuh-build\setup.py) egg_info for package from hg+http://bitbucket.org/pygame/pygame


    WARNING, No "Setup" File Exists, Running "config.py"
    Using WINDOWS configuration...

    Path for SDL not found.
    Too bad that is a requirement! Hand-fix the "Setup"
    Path for FONT not found.
    Path for IMAGE not found.
    Path for MIXER not found.
    Path for SMPEG not found.
    Path for PNG not found.
    Path for JPEG not found.
    Path for PORTMIDI not found.
    Path for FFMPEG not found.
    Path for COPYLIB_tiff not found.
    Path for COPYLIB_z not found.
    Path for COPYLIB_vorbis not found.
    Path for COPYLIB_ogg not found.

    If you get compiler errors during install, doublecheck
    the compiler flags in the "Setup" file.


    Continuing With "setup.py"
    Error with the "Setup" file,
    perhaps make a clean copy from "Setup.in".
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "c:\users\marci\appdata\local\temp\pip-fyauuh-build\setup.py", line 174, in <module>
        extensions = read_setup_file('Setup')
      File "C:\Python27\Lib\distutils\extension.py", line 168, in read_setup_file
        line = expand_makefile_vars(line, vars)
      File "C:\Python27\Lib\distutils\sysconfig.py", line 387, in expand_makefile_vars
        s = s[0:beg] + vars.get(m.group(1)) + s[end:]
    TypeError: cannot concatenate 'str' and 'NoneType' objects
    Complete output from command python setup.py egg_info:




WARNING, No "Setup" File Exists, Running "config.py"

Using WINDOWS configuration...



Path for SDL not found.

Too bad that is a requirement! Hand-fix the "Setup"

Path for FONT not found.

Path for IMAGE not found.

Path for MIXER not found.

Path for SMPEG not found.

Path for PNG not found.

Path for JPEG not found.

Path for PORTMIDI not found.

Path for FFMPEG not found.

Path for COPYLIB_tiff not found.

Path for COPYLIB_z not found.

Path for COPYLIB_vorbis not found.

Path for COPYLIB_ogg not found.



If you get compiler errors during install, doublecheck

the compiler flags in the "Setup" file.





Continuing With "setup.py"

Error with the "Setup" file,

perhaps make a clean copy from "Setup.in".

Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "c:\users\marci\appdata\local\temp\pip-fyauuh-build\setup.py", line 174, in <module>

    extensions = read_setup_file('Setup')

  File "C:\Python27\Lib\distutils\extension.py", line 168, in read_setup_file

    line = expand_makefile_vars(line, vars)

  File "C:\Python27\Lib\distutils\sysconfig.py", line 387, in expand_makefile_vars

    s = s[0:beg] + vars.get(m.group(1)) + s[end:]

TypeError: cannot concatenate 'str' and 'NoneType' objects

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in c:\users\marci\appdata\local\temp\pip-fyauuh-build
Exception information:
Traceback (most recent call last):
  File "C:\Users\Marci\.virtualenvs\pyGame\lib\site-packages\pip\basecommand.py", line 122, in main
    status = self.run(options, args)
  File "C:\Users\Marci\.virtualenvs\pyGame\lib\site-packages\pip\commands\install.py", line 278, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "C:\Users\Marci\.virtualenvs\pyGame\lib\site-packages\pip\req.py", line 1229, in prepare_files
    req_to_install.run_egg_info()
  File "C:\Users\Marci\.virtualenvs\pyGame\lib\site-packages\pip\req.py", line 325, in run_egg_info
    command_desc='python setup.py egg_info')
  File "C:\Users\Marci\.virtualenvs\pyGame\lib\site-packages\pip\util.py", line 697, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command python setup.py egg_info failed with error code 1 in c:\users\marci\appdata\local\temp\pip-fyauuh-build
------------------------------------------------------------
C:\Users\Marci\.virtualenvs\pygame\Scripts\pip运行于2015年5月22日14:39:29
下载/解包hg+http://bitbucket.org/pygame/pygame
克隆汞http://bitbucket.org/pygame/pygame 至c:\users\marci\appdata\local\temp\pip fyauuh build
在“C:\\Program Files\\TortoiseHg\\hg.exe”找到命令“hg”
运行命令“C:\ProgramFiles\TortoiseHg\hg.exe”clone--noupdate-qhttp://bitbucket.org/pygame/pygame c:\users\marci\appdata\local\temp\pip fyauh build
运行命令“C:\ProgramFiles\TortoiseHg\hg.exe”update-q
运行setup.py(路径:c:\users\marci\appdata\local\temp\pip fyauh build\setup.py)从hg获得的包的egg\u信息+http://bitbucket.org/pygame/pygame
警告,不存在运行“config.py”的“安装”文件
正在使用WINDOWS配置。。。
未找到SDL的路径。
可惜这是一个要求!手动修复“设置”
找不到字体的路径。
找不到图像的路径。
找不到混合器的路径。
找不到SMPEG的路径。
未找到PNG的路径。
找不到JPEG的路径。
找不到PORTMIDI的路径。
未找到FFMPEG的路径。
找不到COPYLIB_tiff的路径。
找不到COPYLIB_z的路径。
找不到COPYLIB_vorbis的路径。
找不到COPYLIB_ogg的路径。
如果在安装过程中出现编译器错误,请仔细检查
“设置”文件中的编译器标志。
继续“setup.py”
“设置”文件出错,
也许可以从“Setup.in”中创建一个干净的副本。
回溯(最近一次呼叫最后一次):
文件“”,第17行,在
文件“c:\users\marci\appdata\local\temp\pip fyauh build\setup.py”,第174行,在
扩展名=读取设置文件(“设置”)
文件“C:\Python27\Lib\distutils\extension.py”,第168行,在read\u setup\u文件中
行=展开\u makefile\u变量(行,变量)
expand\u makefile\u vars中的文件“C:\Python27\Lib\distutils\sysconfig.py”,第387行
s=s[0:beg]+vars.get(m.group(1))+s[end:]
TypeError:无法连接'str'和'NoneType'对象
从命令python setup.py egg_info完成输出:
警告,不存在运行“config.py”的“安装”文件
正在使用WINDOWS配置。。。
未找到SDL的路径。
可惜这是一个要求!手动修复“设置”
找不到字体的路径。
找不到图像的路径。
找不到混合器的路径。
找不到SMPEG的路径。
未找到PNG的路径。
找不到JPEG的路径。
找不到PORTMIDI的路径。
未找到FFMPEG的路径。
找不到COPYLIB_tiff的路径。
找不到COPYLIB_z的路径。
找不到COPYLIB_vorbis的路径。
找不到COPYLIB_ogg的路径。
如果在安装过程中出现编译器错误,请仔细检查
“设置”文件中的编译器标志。
继续“setup.py”
“设置”文件出错,
也许可以从“Setup.in”中创建一个干净的副本。
回溯(最近一次呼叫最后一次):
文件“”,第17行,在
文件“c:\users\marci\appdata\local\temp\pip fyauh build\setup.py”,第174行,在
扩展名=读取设置文件(“设置”)
文件“C:\Python27\Lib\distutils\extension.py”,第168行,在read\u setup\u文件中
行=展开\u makefile\u变量(行,变量)
expand\u makefile\u vars中的文件“C:\Python27\Lib\distutils\sysconfig.py”,第387行
s=s[0:beg]+vars.get(m.group(1))+s[end:]
TypeError:无法连接'str'和'NoneType'对象
----------------------------------------
清理。。。
命令python setup.py egg\u info失败,错误代码为c:\users\marci\appdata\local\temp\pip fyauuh build中的1
例外信息:
回溯(最近一次呼叫最后一次):
文件“C:\Users\Marci\.virtualenvs\pyGame\lib\site packages\pip\basecommand.py”,主目录第122行
status=self.run(选项、参数)
文件“C:\Users\Marci\.virtualenvs\pyGame\lib\site packages\pip\commands\install.py”,第278行,正在运行
需求设置准备文件(查找器,强制根目录,鸡蛋信息=self.bundle,bundle=self.bundle)
文件“C:\Users\Marci\.virtualenvs\pyGame\lib\site packages\pip\req.py”,第1229行,在prepare\u文件中
请求安装。运行\u egg\u info()
文件“C:\Users\Marci\.virtualenvs\pyGame\lib\site packages\pip\req.py”,第325行,运行信息
命令\u desc='python setup.py egg\u info')
文件“C:\Users\Marci\.virtualenvs\pyGame\lib\site packages\pip\util.py”,第697行,在call_子流程中
%(命令描述,过程返回代码,cwd))
安装错误:命令python setup.py egg\u info失败,错误代码为1,位于c:\users\marci\appdata\local\temp\pip fyauh build中

你的问题有答案了