windows下:
使用vs2013作为IDE,配置参照http://www.bkjia.com/Pythonjc/883437.html
python安装包管理:
先安装python,我安装的是python3.5.2
然后安装easy_install,会自动在python的安装路径下生成scripts目录,相关的可执行文件都放在这个目录中,将该目录添加到环境变量中。
easy_install pip ->安装pip工具
pip install numpy ->通过pip安装numpy包
(安装的python在2.7或者3.4及其更新的版本,其中自带了pip,但是比较老。最好是用easy_install来安装pip,版本比较新)
在安装numpy时报错:
".............
pip._vendor.requests.packages.urllib3.exceptions.ReadTimeoutError:HTTPSConnectionPool<host='pypi.python.org',port=443>:Read timed out
You are using pip version 8.1.1,however version 9.0.1 is avaliable.
You should consider upgrading via the 'python -m pip install --upgrade pip' command "
按照上面的错误提示,再输入python -m pip install --upgrade pip,对pip进行更新
继续安装numpy:pip install numpy
又报错:
“these packages do not match the hashes from the requirments file......”
大意就是说更新一个包之前没有先更新hash值
帖子里给出的解决办法为:pip install --no-cache-dir numpy