我已经安装了两个版本的python。安装PyMySQL for Anaconda python
的Python 2.7.2(默认情况下,2011年6月12日,15点08分59秒)[MSC v.1500 32位(英特尔)]在Win32
的Python 2.7.7 |阿纳康达2.0.1(64-位)| (默认,2014年6月11日,10:40:02)[MSC v.1 500 64位(AMD64)]在win32
我试图安装PyMySQL for anaconda python包,问题是,当我尝试安装它,它安装在Python 2.7.2中。我可以如何为anaconda版本安装库。我试着用蟒蛇命令
conda install PyMySQ
,但没有工作 也试过
python.exe C:\Users\jimenez\Downloads\PyMySQL-0.6.2\setup.py install
这里是在蟒蛇目录发生
C:\Anaconda>python.exe C:\Users\jimenez\Downloads\PyMySQL-0.6.2\setup.py install
running install
running bdist_egg
running egg_info
writing PyMySQL.egg-info\PKG-INFO
writing top-level names to PyMySQL.egg-info\top_level.txt
writing dependency_links to PyMySQL.egg-info\dependency_links.txt
warning: manifest_maker: standard file 'setup.py' not found
reading manifest file 'PyMySQL.egg-info\SOURCES.txt'
writing manifest file 'PyMySQL.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
warning: install_lib: 'build\lib' does not exist -- no Python modules to install
creating build\bdist.win-amd64\egg
creating build\bdist.win-amd64\egg\EGG-INFO
copying PyMySQL.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO
copying PyMySQL.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying PyMySQL.egg-info\dependency_links.txt -> build\bdist.win-amd64\egg\EGG-I
NFO
copying PyMySQL.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist\PyMySQL-0.6.2-py2.7.egg' and adding 'build\bdist.win-amd64\egg' t
o it
removing 'build\bdist.win-amd64\egg' (and everything under it)
Processing PyMySQL-0.6.2-py2.7.egg
Removing c:\anaconda\lib\site-packages\PyMySQL-0.6.2-py2.7.egg
Copying PyMySQL-0.6.2-py2.7.egg to c:\anaconda\lib\site-packages
PyMySQL 0.6.2 is already the active version in easy-install.pth
Installed c:\anaconda\lib\site-packages\pymysql-0.6.2-py2.7.egg
Processing dependencies for PyMySQL==0.6.2
Finished processing dependencies for PyMySQL==0.6.2
C:\Anaconda>python
Python 2.7.7 |Anaconda 2.0.1 (64-bit)| (default, Jun 11 2014, 10:40:02) [MSC v.1
500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://binstar.org
>>> import PyMySQL
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named PyMySQL
,但它不工作要么。我还能尝试什么?在这种情况下,我可以在anaconda中使用哪些库来访问mysql数据服务器?
至于为什么你尝试的第一步不起作用:它看起来像PyMySQL尚未被Anaconda支持:http://docs.continuum.io/anaconda/pkg-do cs.html但这并不意味着你不能自己安装它,所以你尝试的第二步应该工作。 – bernie 2014-09-12 21:04:06
似乎anaconda安装图书馆,但当我打电话时,它无法找到它 – 2014-09-12 21:10:05
尝试:'import sys; sys.path'来确保安装它的目录位于路径 – bernie 2014-09-12 21:13:29