简体   繁体   English

Python问题-安装模块

[英]Problems with Python - Installing Modules

Had a friend write some script for me. 有一个朋友为我写一些脚本。 After about an hour, he declared himself one working on it and sent it to me to complete. 大约一个小时后,他宣布自己正在为此工作,并将其发送给我完成。 So I downloaded Python27 and have been tying to get my head in the game. 因此,我下载了Python27,并一直努力让自己参与其中。

My friend used some extra modules in his program and I need to get those up and running before I can see the code running.I've tried following several instructionals with no success. 我的朋友在他的程序中使用了一些额外的模块,在看到代码运行之前,我需要先启动并运行这些模块。我尝试按照几条说明进行操作 ,但均未成功。

So I was hoping for some help. 所以我希望能有所帮助。 My Python directory is where it should be in C:\\Python27. 我的Python目录位于C:\\ Python27中。 I've been trying to use the Python )command line) in order to input the code as given and i keep getting back the same result. 我一直在尝试使用Python)命令行)以输入给定的代码,而我一直在获得相同的结果。

"File " line 1 $pip install requests “文件”第1行$ pip安装请求

SyntaxError: invalid syntax SyntaxError:语法无效

I am completely lost and starting to get a headache. 我完全迷路了,开始头疼。 Please help! 请帮忙!

'pip' is a command line program, not a python construct. 'pip'是一个命令行程序,而不是python构造。

Try How do I install pip on Windows? 尝试如何在Windows上安装pip? first to get the pip command on Windows. 首先在Windows上获取pip命令。

You should not use python command line interpreter to install the package. 您不应该使用python命令行解释器来安装软件包。

First, follow this question to install pip on Windows. 首先,请按照以下问题在Windows上安装pip。 Then you can directly put the pip install command in your cmd.exe and execute it. 然后,您可以将pip install命令直接放在cmd.exe中并执行它。

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

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