使用easy_install安装python包的方法 与python开源库
来源:互联网 发布:淘宝有什么奇怪的东西 编辑:程序博客网 时间:2024/05/16 15:02
首先安装easy_install
easy_install 是 setuptools里的一个组件
安装easy_install 即是安装setuptools
链接https://pypi.python.org/pypi/setuptools
Download ez_setup.py and run it using the target Python version. The scriptwill download the appropriate version and install it for you:
> wget https://bootstrap.pypa.io/ez_setup.py -O - | python
Note that you will may need to invoke the command with superuser privileges toinstall to the system Python:
> wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python
Alternatively, Setuptools may be installed to a user-local path:
> wget https://bootstrap.pypa.io/ez_setup.py -O - | python - --user(一般第二个方法可以)
安装好之后使用easy_install 安装
方法如下
For basic use of easy_install, you need only supply the filename or URL ofa source distribution or .egg file (Python Egg).
Example 1. Install a package by name, searching PyPI for the latestversion, and automatically downloading, building, and installing it:
easy_install SQLObject
Example 2. Install or upgrade a package by name and version by findinglinks on a given "download page":
easy_install -f http://pythonpaste.org/package_index.html SQLObject
Example 3. Download a source distribution from a specified URL,automatically building and installing it:
easy_install http://example.com/path/to/MyPackage-1.2.3.tgz
Example 4. Install an already-downloaded .egg file:
easy_install /my_downloads/OtherPackage-3.2.1-py2.3.egg
Example 5. Upgrade an already-installed package to the latest versionlisted on PyPI:
easy_install --upgrade PyProtocols
Example 6. Install a source distribution that's already downloaded andextracted in the current directory (New in 0.5a9):
easy_install .
Example 7. (New in 0.6a1) Find a source distribution or Subversioncheckout URL for a package, and extract it or check it out to~/projects/sqlobject (the name will always be in all-lowercase), where itcan be examined or edited. (The package will not be installed, but it caneasily be installed witheasy_install ~/projects/sqlobject. SeeEditingand Viewing Source Packages below for more info.):
easy_install --editable --build-directory ~/projects SQLObject
Easy Install accepts URLs, filenames, PyPI package names (i.e., distutils"distribution" names), and package+version specifiers. In each case, it willattempt to locate the latest available version that meets your criteria.
When downloading or processing downloaded files, Easy Install recognizesdistutils source distribution files with extensions of .tgz, .tar, .tar.gz,.tar.bz2, or .zip. And of course it handles already-built .eggdistributions as well as.win32.exe installers built using distutils.
By default, packages are installed to the running Python installation'ssite-packages directory, unless you provide the-d or --install-diroption to specify an alternative directory, or specify an alternate locationusing distutils configuration files. (SeeConfiguration Files, below.)
By default, any scripts included with the package are installed to the runningPython installation's standard script installation location. However, if youspecify an installation directory via the command line or a config file, thenthe default directory for installing scripts will be the same as the packageinstallation directory, to ensure that the script will have access to theinstalled package. You can override this using the-s or --script-diroption.
Installed packages are added to an easy-install.pth file in the installdirectory, so that Python will always use the most-recently-installed versionof the package. If you would like to be able to select which version to use atruntime, you should use the -m or--multi-version option.
原文链接
http://peak.telecommunity.com/DevCenter/EasyInstall#installing-easy-install
大量的开源库 Python Package Index
- 使用easy_install安装python包的方法 与python开源库
- 使用easy_install安装python的包
- 使用Easy_install 安装python站点包
- python 安装easy_install方法
- python的安装包管理工具easy_install
- Python easy_install 安装使用
- 使用easy_install安装python第三方模块的方法
- Python包管理工具easy_install安装
- Python包管理工具easy_install安装
- Python包管理工具easy_install安装
- Python包管理工具easy_install安装
- Python-- easy_install 的安装
- Python-- easy_install 的安装
- Python-- easy_install 的安装
- Python-easy_install的安装
- Python-- easy_install 的安装
- Python-- easy_install 的安装
- python easy_install的安装
- fragment刷新
- Oracle用plsqldeveloper问题总结
- UDP数据的接收
- HPU 1702:我要上蓝翔【DFS】
- 摄像机穿墙时自动缩小距离
- 使用easy_install安装python包的方法 与python开源库
- pat1043:输出PATest
- android edittext 限制输入符号表情
- Hibernate映射——一对一双向关联映射(六)
- 沉没成本
- Android 内存优化实例
- object_id
- 按相应规则取走珠子的最多颗数
- leetcode 136. Single Number 题解