简体   繁体   English

无法从python命令提示符安装任何python软件包

[英]Can't install any python package from the python command prompt

I am trying to install some python packages from the python shell but I get syntaxError. 我正在尝试从python外壳安装一些python软件包,但出现语法错误。 I am using python 3.4.3 which supposed to come with pip installed and I can see pip3 pip3.4, pip, easy_install, and easy_install-3.4 under scripts but whenever I run the command in the shell I get syntax error. 我正在使用应该安装了pip的python 3.4.3,我可以在脚本下看到pip3 pip3.4,pip,easy_install和easy_install-3.4,但是每当我在shell中运行命令时,都会出现语法错误。 Am I not supposed to use the python shell for package installation? 我不应该使用python shell进行软件包安装吗? I am using windows 8.1 if that would explain something. 我正在使用Windows 8.1,如果这可以解释一些问题。 I tried these commands: pip install packageName --- got syntaxError with this message:File '' line 1, pip install(with a mark at last l in install). 我尝试了以下命令:pip install packageName ---得到了errorError with this message:File''line 1,pip install(在安装中最后一个标记)。 easy_install packageName generated the same error message but with the mark at the last letter in the packagename, i double checked all spellings but I can't seem to see what the problem is. easy_install packageName生成了相同的错误消息,但是在包名的最后一个字母上带有标记,我仔细检查了所有拼写,但似乎看不到问题所在。 How can I install packages? 如何安装软件包?

Am I not supposed to use the python shell for package installation? 我不应该使用python shell进行软件包安装吗?

No. Commands like pip are to be run on the operating system command line (ie, the "DOS prompt" on Windows). 否。像pip这样的命令将在操作系统命令行上运行(即Windows上的“ DOS提示符”)。

No you are just to use the Windows terminal for pip package installations. 不,您只是将Windows终端用于pip软件包安装。 If that does not work, ensure that you have installed Python properly following this guide Here . 如果这不起作用,请确保已按照本指南此处正确安装了Python。

Click Windows(button)+R then type cmd . 单击Windows(按钮)+ R,然后键入cmd In there type pip -V , what version does it show? 在其中输入pip -V ,它显示什么版本?

If you get pip 6.1.1 from C:\\Python32\\lib\\site-packages <python 3.4> (depending on your directory) then you're good, simply make your installations from there. 如果您pip 6.1.1 from C:\\Python32\\lib\\site-packages <python 3.4> (取决于您的目录)获得pip 6.1.1 from C:\\Python32\\lib\\site-packages <python 3.4>pip 6.1.1 from C:\\Python32\\lib\\site-packages <python 3.4>很好,只需从此处进行安装即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM