难免会遇到历史遗留的python 2 的代码。
如果指定需要python 2.7的代码,请安装python2.7.9版本,不要安装必它还低的版本。
因为python 2.7.9包含了几个前所未有的重大变化:
上面是结论,下面是踩坑过程。安装了python 2.7.0 最后没从坑里爬出去。
win10的cmd或者powershell中,执行python命令,却弹出了应用商店,可以参考Win 10 中使用 Python 碰到的奇怪现象 C:\Python27\python.exe .\setup.py install。如果安装后,pip不在搜索路径里,可以参考Python pip : 无法将“pip”。我直接使用了绝对路径。pip之后,我们也无法使用pip来安装其他python包。因为访问不了仓库。http://pypi.python.org/simple/。而,本应该访问的是https://pypi.python.org/simple/ C:\Python27\Scripts\pip.exe install chard
Downloading/unpacking chardet==1.1
Cannot fetch index base URL http://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement chardet==1.1
No distributions at all found for chardet==1.1
Storing complete log in C:\Users\GRRJ\AppData\Roaming\pip\pip.log
python2.7.9