1.使用pip安装python 模块
- 打开cmd
- 输入pip install *,如pip install numpy
- 等待安装(如下)
C:WINDOWSSystem32>pip install numpy Collecting numpy Downloading numpy-1.14.1-cp36-none-win_amd64.whl (13.4MB) 100% |████████████████████████████████| 13.4MB 59kB/s Installing collected packages: numpy Successfully installed numpy-1.14.1
问题:提示 invalid syntax
解决方案:pip install 是在windows环境下安装的,而非在python环境下,所以要退出python环境
C:WINDOWSSystem32>python
Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> pip install numpy
File "<stdin>", line 1
pip install numpy
^
SyntaxError: invalid syntax
>>> ^Z
C:WINDOWSSystem32>>pip install