Home > Database > Mysql Tutorial > body text

virtualenv-在Python虚拟环境中使用环境外的mysql

WBOY
Release: 2016-06-06 09:38:16
Original
1698 people have browsed it

virtualenvmysqlpython

环境:win8 64bit、Python2.7、mysql 5.6.20,

Python和mysql连接使用MySQL-python-1.2.3.win32-py2.7

描述:

我是下载MySQL-python-1.2.3.win32-py2.7.exe后双击打开运行安装,安装正确,可以在cmd命令行正确启动数据库。但是我需要在virtualenv环境下使用mysql,问题出现了:

由于安装MySQL-python-1.2.3.win32-py2.7是下载后双击打开安装的,也就是说在虚拟环境外部安装的,所以在venv环境中import MySQLdb时提示没又该模块。但是又要在虚拟环境中使用,请各位老师指点一番,谢谢

1:在虚拟环境中如何安装MySQL-python-1.2.3.win32-py2.7

2:在虚拟环境中是否能够引入环境外的包

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!