如果是windows作業系統,我們需要先安裝easy_install,那麼我們先來安裝easy_install
.安裝setuptools(easy_install):
a.如果是32位的windows作業系統
32位的windows作業系統,直接找到對應的exe,然後安裝即可
b.如果是64位的windows作業系統
windows 64為下沒有安裝包,需要自己編譯安裝,過程如下:
下載ez_setup.py
運行:
| 代碼如下 |
複製代碼 |
python ez_setup.py
|
2.然後配置環境變數:
例如我電腦將路徑:D:toolsPython27Scripts
添加到環境變數中
--EOF--
安裝成功easy_install之後我們再來給python安裝sqlalchemy
然後執行下面的命令
| 代碼如下 |
複製代碼 |
easy_install SQLAlchemy |
顯示如下,安裝成功:
| 代碼如下 |
複製代碼 |
D:>easy_install SQLAlchemy Searching for SQLAlchemy Reading http://pypi.python.org/simple/SQLAlchemy/ Reading http://www.sqlalchemy.org Best match: SQLAlchemy 0.8.0b2 Downloading http://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-0.8.0 b2.tar.gz#md5=09537c7b425d0be433f7aceabbf23d68 Processing SQLAlchemy-0.8.0b2.tar.gz Running SQLAlchemy-0.8.0b2setup.py -q bdist_egg --dist-dir c:usersw3appdata localtempeasy_install-lnagt1SQLAlchemy-0.8.0b2egg-dist-tmp-0flwk1 warning: no files found matching '*.jpg' under directory 'doc' no previously-included directories found matching 'docbuildoutput' *************************************************************************** Unable to find vcvarsall.bat WARNING: The C extension could not be compiled, speedups are not enabled. Failure information, if any, is above. Retrying the build without the C extension now. *************************************************************************** warning: no files found matching '*.jpg' under directory 'doc' no previously-included directories found matching 'docbuildoutput' zip_safe flag not set; analyzing archive contents... *************************************************************************** WARNING: The C extension could not be compiled, speedups are not enabled. Plain-Python build succeeded. *************************************************************************** Adding sqlalchemy 0.8.0b2 to easy-install.pth file Installed d:toolspython27libsite-packagessqlalchemy-0.8.0b2-py2.7.egg Processing dependencies for SQLAlchemy Finished processing dependencies for SQLAlchemy |
D:>
--EOF--