不知道如何解决这个Cmd命令错误? [英] Not sure how to fix this Cmd command error?
问题描述
在Windows 8和我安装了最新的python,我打算使用崇高的文本3作为我的ide使用flask创建一个网站。首先我需要安装一个虚拟环境使用这个命令pip install virtualenv,这是我通过cmd收到的响应。
C:\Users\osman_000> pip install virtualenv
' pip'不被识别为内部或外部命令,
可操作的程序或批处理文件。
C:\Users\osman_000>
如果你知道如何解决这个问题,请别人帮忙,因为我不知道从这里做什么感谢。
在Windows下, pip
文件夹,例如 C:\ Python27 \Scripts
。
如何运行 pip
?
-
按
[WIN] + R
并键入cmd.exe
。 - 然后通过在命令行中键入
cdC:\Python27 \Scripts
(或者您已经安装了Python的其他地方),导航到您的Python安装的Scrips文件夹 -
要运行
pip
,请键入pip.exe
进入命令行。 -
如果是这样,您可以使用
pip install package_name
Python包。
我推荐的:
b $ b每次导航到Scripts文件夹都非常讨厌,所以你可以告诉Windows你的 pip.exe
的存储位置。
-
打开控制面板,搜索环境变量,然后选择编辑环境变量。
-
当一个小窗口打开时,按下面的环境变量按钮。
-
现在,双击条目单击新建并输入
C:\Python27\Scripts
(如果这是您的拼写路径,请参阅上文)。 -
现在打开命令行并通过
pip $ c安装$ c>应该有效。
希望这有帮助!
Im on windows 8 and i have installed the latest python,and im going to use sublime text 3 as my ide to create a website using flask.But firstly i needed to install a virtual enviroment using this command pip install virtualenv,and this is the response i recived by cmd.
C:\Users\osman_000>pip install virtualenv
'pip' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\osman_000>
Please can someone help if you know how to fix this,as im not excatly sure what do from here thanks.
Under Windows, pip
is stored in the Python scripts folder, e.g. "C:\Python27\Scripts
".
How to run pip
?
Open a Command line by pressing
[WIN]+R
and typingcmd.exe
.Then navigate tho the Scrips folder of your Python installation by typing
cd "C:\Python27\Scripts"
(Or where else you've installed Python) into the command line.To run
pip
now typepip.exe
into the command line. This should print a help message.If so, you can use
pip install package_name
to install a Python package.
What I recommend:
Navigating to the Scripts folder every time is very annoying, so you can tell Windows where your pip.exe
is stored.
Open the control panel, search for "environment variables" and choose edit environment variables.
When a little window is opened, press the button "Environment variables" on the bottom.
Now, double-click the entry "Path", click "New" and enter "
C:\Python27\Scripts
" (If this is your intallation path, see above). Close all windows with clicking "OK", you're done!Now opening a commandline and installing through
pip
should work.
Hope this helps!
这篇关于不知道如何解决这个Cmd命令错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!