[英]Cant find version or use pip using python27 command line
I have been looking for the past hour regarding installing modules using. 我一直在寻找有关安装模块使用的过去一个小时。 It says that python27 comes with pip, However when I type
python -m pip install --upgrade pip wheel setuptools
into the command line I just get the error NameError: Name 'python' is not defined.
它说python27是pip附带的,但是当我在命令行中输入
python -m pip install --upgrade pip wheel setuptools
,我只会收到错误NameError: Name 'python' is not defined.
I cant even enter python --version
. 我什至不能输入
python --version
。
The module I am trying to install is kivy. 我尝试安装的模块是kivy。 On their website it just say download python and type in that string into the command line and it should work.
在他们的网站上,只需说下载python并在命令行中输入该字符串即可,它应该可以工作。 I cant find anywhere if i need to do something beforehand.
如果我需要事前做某事,我找不到任何地方。
I think you have to set PATH in environment variable for python command to work.If you're on windows follow this: 我认为您必须在环境变量中设置PATH才能使python命令正常工作。如果您在Windows上,请遵循以下步骤:
My Computer > Properties > Advanced System Settings > Environment Variables > Then under system variables create a new Variable name PATH.Under value type your python installation directory which includes py.exe etc(scripts folder).Then it'll work. 我的电脑>属性>高级系统设置>环境变量>然后在系统变量下创建一个新的变量名称PATH。在值下键入您的python安装目录,其中包括py.exe etc(scripts文件夹)。 OR open cmd prompt in python folder(shift+context menu click) and then enter command.
或在python文件夹中打开cmd提示符(单击Shift +上下文菜单),然后输入命令。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.