pycharm安装可以选择安装位置,可以不装在python安装路径下,下图左下角可以选择路径
命令行直接pip默认装在python的安装文件夹里的lib路径下,如
C:\Users\xxxx\AppData\Local\Programs\Python\Python36\Lib\site-packages
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)] on win32
import geatpy as ea
print(ea.__version__)
2.2.1
C:\Users\SSMM>python -m pip install --upgrade pip
Collecting pip
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(, ' Connection to files.pythonhosted.org timed out. (connect timeout=15)')': /packages/62/ca/94d32a6516ed197a491d17d46595ce58a83cbb2fca280414e57cd86b84dc/pip-19.2.1-py2.py3-none-any.whl
Downloading https://files.pythonhosted.org/packages/62/ca/94d32a6516ed197a491d17d46595ce58a83cbb2fca280414e57cd86b84dc/pip-19.2.1-py2.py3-none-any.whl (1.4MB)
100% |████████████████████████████████| 1.4MB 317kB/s
Installing collected packages: pip
Found existing installation: pip 19.0.3
Uninstalling pip-19.0.3:
Successfully uninstalled pip-19.0.3
Successfully installed pip-19.2.1
C:\Users\SSMM>pip install numpy
Requirement already satisfied: numpy in c:\users\ssmm\appdata\roaming\python\python37\site-packages (1.17.0)
C:\Users\SSMM>pip install matplotlib
Requirement already satisfied: matplotlib in d:\users\ssmm\appdata\local\programs\python\python37\lib\site-packages (3.1.1)
Requirement already satisfied: numpy>=1.11 in c:\users\ssmm\appdata\roaming\python\python37\site-packages (from matplotlib) (1.17.0)
Requirement already satisfied: cycler>=0.10 in d:\users\ssmm\appdata\local\programs\python\python37\lib\site-packages (from matplotlib) (0.10.0)
Requirement already satisfied: python-dateutil>=2.1 in d:\users\ssmm\appdata\local\programs\python\python37\lib\site-packages (from matplotlib) (2.8.0)
Requirement already satisfied: kiwisolver>=1.0.1 in d:\users\ssmm\appdata\local\programs\python\python37\lib\site-packages (from matplotlib) (1.1.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in d:\users\ssmm\appdata\local\programs\python\python37\lib\site-packages (from matplotlib) (2.4.2)
Requirement already satisfied: six in c:\users\ssmm\appdata\roaming\python\python37\site-packages (from cycler>=0.10->matplotlib) (1.12.0)
Requirement already satisfied: setuptools in d:\users\ssmm\appdata\local\programs\python\python37\lib\site-packages (from kiwisolver>=1.0.1->matplotlib) (40.8.0)