找到你要的答案

Q:Sublime text 3 using pip to download stuff

Q:Sublime Text 3使用PIP下载东西

I have set my sublime text to build on python version 3.4.3. I am trying to download Scrapy to test some stuff, but pip download is failing.

My code in sublime text is :

import sys
print (sys.version)
pip install Scrapy

Output:

File "/Users/X/Documents/Learn/XX/Python1.py", line 3 pip install Scrapy ^ SyntaxError: invalid syntax [Finished in 0.1s with exit code 1]

Can anyone point out what am I doing wrong?

我已经把我的崇高的文本建立在Python版本3.4.3。我想下载scrapy测试一些东西,但PIP下载失败。

我在崇高文本中的代码是:

import sys
print (sys.version)
pip install Scrapy

输出:

File "/Users/X/Documents/Learn/XX/Python1.py", line 3 pip install Scrapy ^ SyntaxError: invalid syntax [Finished in 0.1s with exit code 1]

谁能指出我做错了什么?

answer1: 回答1:

You need to run pip install scrapy from the command line, not from within a Python program. Open up Terminal (Applications -> Utilities -> Terminal.app) and run pip from there.

你需要运行pip安装Scrapy从命令行,不是从一个Python程序。打开终端(应用程序- >;工具- >;终端。APP)和PIP从那里跑。

python-3.x  pip  sublimetext3