win10 安装python2

换了台电脑,在mac和linux环境安装python环境都很特别简单,在windows下折腾了好久,最后记录下,

卸载旧版,用choco工具直接安装

$ choco install python2

Chocolatey v0.10.15
Installing the following packages:
python2
By installing you accept licenses for the packages.
python2 v2.7.18 already installed.
 Use --force to reinstall, specify a version to install, or try upgrade.

Chocolatey installed 0/1 packages.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Warnings:
 - python2 - python2 v2.7.18 already installed.
 Use --force to reinstall, specify a version to install, or try upgrade.

Did you know the proceeds of Pro (and some proceeds from other
 licensed editions) go into bettering the community infrastructure?
 Your support ensures an active community, keeps Chocolatey tip top,
 plus it nets you some awesome features!
 https://chocolatey.org/compare

运行pip

$ pip list
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Package    Version
---------- -------
pip        19.2.3
setuptools 41.2.0
WARNING: You are using pip version 19.2.3, however version 20.2.4 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

到这里就算已经安装完成了,后面,安装一些项目中用到的模块,加上下载源
如下
pip install pycrypto -i https://mirrors.ustc.edu.cn/pypi/web/simple/

No module named Crypto.Cipher
$ pip install pycrypto

ImportError: No module named tornado.httpserver
$ pip install tornado==4.1

ImportError: No module named sqlalchemy
$ pip install SQLAlchemy==1.1.9 # 新旧版本区别
ImportError: No module named redis
$ pip install redis
ImportError: No module named wtforms
$ pip install WTForms
ImportError: No module named pinyin
$ pip install pinyin

ImportError: No module named lxml
$ pip install lxml
ImportError: No module named xlwt
$ pip install xlwt
ImportError: No module named xlrd
$ pip install xlrd
ImportError: No module named dateutil.parser
$ pip install python-dateutil

ImportError: No module named wtforms_json
$ pip install WTForms-JSON

ImportError: No module named PIL
$ pip install Pillow
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值