为什么我用pycharm创建的虚拟环境安装pygame报错
(py_game) C:\Python\Code\py_game>pip install pygame
Collecting pygame
Using cached https://files.pythonhosted.org/packages/0f/9c/78626be04e193c0624842090fe5555b3805c050dfaa81c8094d6441db2be/pygame-1.9.6.tar.gz
Complete output from command python setup.py egg_info:
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using WINDOWS configuration...
Download prebuilts to "prebuilt_downloads" and copy to "./prebuilt-x64"? [Y/n]Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\chenl\AppData\Local\Temp\pip-install-c6xcev8g\pygame\setup.py", line 194, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "C:\Users\chenl\AppData\Local\Temp\pip-install-c6xcev8g\pygame\buildconfig\config.py", line 210, in main
deps = CFG.main(**kwds)
File "C:\Users\chenl\AppData\Local\Temp\pip-install-c6xcev8g\pygame\buildconfig\config_win.py", line 576, in main
and download_win_prebuilt.ask(**download_kwargs):
File "C:\Users\chenl\AppData\Local\Temp\pip-install-c6xcev8g\pygame\buildconfig\download_win_prebuilt.py", line 302, in ask
reply = raw_input(
EOFError: EOF when reading a line
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\chenl\AppData\Local\Temp\pip-install-c6xcev8g\pygame\
如果用cmd创建的环境就没有问题
正在回答
同学,你好。同学电脑中安装的是pthon3.8的版本吗?3.8版本在安装pygame时会有兼容问题。
1、同学在Pycharm中创建虚拟环境和cmd中创建虚拟环境(环境变量中)时使用的Python版本一致吗?
2、同学可以尝试使用其他环境安装pygame
如果我的回答解决了您的疑惑,请采纳!祝学习愉快~~~~
- 参与学习 人
- 提交作业 2727 份
- 解答问题 8160 个
想要进入Python Web、爬虫、人工智能等高薪领域,你需要掌握本阶段的Python基础知识,课程安排带你高效学习轻松入门,学完你也能听得懂Python工程师的行业梗。
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星