Python环境搭建教程:
Python下载地址:
我下载的是3.5.2的,
Note that Python 3.5.2 cannot be used on Windows XP or earlier.
Windows x86-64 executable installer
Pycharm安装教程:
Pycharm下载地址:
python安装包的时候一般是通过命令行执行“pip3 install package_name”,但是这样很容易报错,原因大概是网络原因。这时候可以加下面这个参数,通过镜像下载。
-i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
而python安装包的时候,也可能会报pip3版本太旧的错。所以可以通过如下命令解决。
python -m pip install --upgrade pip -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
假设你要安装的包有很多个,这时你可以通过执行bat脚本的方式。在Python35-32\Lib\site-packages目录下(我的python安装目录是默认的,也就是C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\Lib\site-packages)写一个bat文件:
pip3 install psutil==5.4.7 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
pip3 install Py3AMF==0.8.9 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
pip3 install PyInstaller==3.3.1 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
pip3 install PyQt5==5.9.1 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
pip3 install sip==4.19.8 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
pip3 install urllib3==1.23 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
pip3 install requests==2.19.1 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
pip3 install xmltodict==0.11.0 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
pip3 install lxml==4.2.5 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
pip3 install socketIO-client==0.7.2 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
pip3 install pillow==5.2.0 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
pip3 install oss2==2.4.0 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
写完直接执行,执行完就安装好了。