[英]Need to install pip and pygame for Python 3.7.2 IDLE (invalid syntax)
I have recently installed Python 3.7.2 IDLE and I have downloaded pygame
, but when I say import pygame
it says module not found
.我最近安装了 Python 3.7.2 IDLE 并且我已经下载了pygame
,但是当我说import pygame
它说module not found
。 I found out that I have to install pip but when I try to it says invalid syntax.我发现我必须安装pip,但是当我尝试安装时,它说语法无效。
I am trying to install it through CMD but I am not sure how to do it within a file, because I don't know what to do after I find a file using CMD.我正在尝试通过 CMD 安装它,但我不确定如何在文件中进行安装,因为在使用 CMD 找到文件后我不知道该怎么做。
Any ideas?有任何想法吗? I am on Windows 10.我在 Windows 10 上。
Try using a virtualenv for your project :尝试为您的项目使用 virtualenv:
mkvirtualenv --python=C:\Python35-32\python.exe pythonthreeEnv
workon pythonthreeEnv
then:
Install your package using : pip install Pygame
Doesn't work for me - as I am new to Python, it is probably a fault on my part. 对我不起作用-因为我是Python的新手,这可能是我的错。 Can anybody send a screenshot or copy paste code for me to input into python? 有人可以发送屏幕截图或复制粘贴代码供我输入python吗?
Many thanks, Michal 非常感谢,米哈尔
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.