python下安装easy_install、pip遇到的问题

如果对python安装不太熟悉,可以先安装python。如何安装python


问题背景: 我是把python2.7安装在D盘下DOWNLOADS,然后是python2.7的。即D:\Downloads\python2.7


然后在其中也安装好了   pip 和 easy_install了,这两者都是在D:\Downloads\python2.7\Scripts。


但是在cmd中运行,总是说没有该文件存在。。。。

D:\>python

Python 2.7.11

>>>python -V

Traceback <most recentcall last> :

File "<stdin>",line 1,in <module>

NameError: name 'python' is not defined


D:\>python -V

Python 2.7.11


经过若干小时的各种试坑,终于探出了一条光明大道。。。。



参考博客:

python安装pip和easy_install


根据上述两个博客,我先安装好了pip,安装的过程及其蛋疼。。。。我擦

python下安装easy_install、pip遇到的问题

python下安装easy_install、pip遇到的问题python下安装easy_install、pip遇到的问题python下安装easy_install、pip遇到的问题

OK! 上述是把 pip安装好了。


Windows 下 Python easy_install 的安装  OK!根据这个左边博客,安装easy_install

python下安装easy_install、pip遇到的问题

python下安装easy_install、pip遇到的问题python下安装easy_install、pip遇到的问题





easy_install 和 pip 的安装及使用


easy_install 和 pip的介绍:

  • easy_install和pip都是用来下载安装Python一个公共资源库PyPI 
    的相关资源包的,pip是easy_install的改进版,提供更好的提示信 
    息,删除package等功能。老版本的python中只有easy_install, 
    没有pip。

  • easy_install 打包和发布 Python 包

  • pip 是包管理


easy_install的用法:

安装一个包

easy_install 包名
easy_install "包名 == 包的版本号"

升级一个包

easy_install -U "包名 >= 包的版本号"

pip 的用法

安装一个包

pip install 包名 pip install 包名 == 包的版本号

升级一个包 (如果不提供version号,升级到最新版本)

pip install --upgrade 包名 >= 包的版本号

删除一个包

pip uninstall 包名

easy_install 不是内部或外部命令,也不是可执行的程序



总结感悟:这儿坑有点多啊。。。但是踩了过后,觉得还是好坑啊。。。