无法在virtualenv中安装mySQL python
当我尝试在virtualenv中安装MySQL-python(无法在virtualenv中安装mySQL python,python,python-2.7,pip,virtualenv,mysql-python,Python,Python 2.7,Pip,Virtualenv,Mysql Python,当我尝试在virtualenv中安装MySQL-python(pip-install-MySQL-python)时,我得到以下错误(截短到最后几行) 谷歌曾告诉我需要安装python-devel,尽管当我运行yum安装python-devel时,我会发现 Package python-devel-2.6.6-52.el6.x86_64 already installed and latest version Nothing to do 我在安装了python 2.6和2.7的CentOS 6.
pip-install-MySQL-python
)时,我得到以下错误(截短到最后几行)
谷歌曾告诉我需要安装python-devel
,尽管当我运行yum安装python-devel
时,我会发现
Package python-devel-2.6.6-52.el6.x86_64 already installed and latest version
Nothing to do
我在安装了python 2.6和2.7的CentOS 6.5机器上。我在我的VirtualNVS中使用Python2.7。我在运行pip安装mySQL-python
时激活了virtualenv
我已经尝试过在激活和停用virtualenv的情况下运行yum install python devel
,两次都会显示“ready installed”消息
这是否意味着Python27安装没有得到python-devel安装
另一个线程建议尝试yum安装mysql-devel.x86_64
,尽管这会
Resolving Dependencies
--> Running transaction check
---> Package mysql-devel.x86_64 0:5.1.73-3.el6_5 will be installed
--> Processing Dependency: mysql = 5.1.73-3.el6_5 for package: mysql-devel-5.1.73-3.el6_5.x86_64
--> Finished Dependency Resolution
Error: Package: mysql-devel-5.1.73-3.el6_5.x86_64 (base)
Requires: mysql = 5.1.73-3.el6_5
Installed: mysql-5.5.40-1.el6.remi.x86_64 (@remi)
mysql = 5.5.40-1.el6.remi
Available: mysql-5.1.73-3.el6_5.x86_64 (base)
mysql = 5.1.73-3.el6_5
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
(使用
--skip-breaked
不起作用,它只是跳过了它)解决:我需要运行sudo-yum--enablerepo=remi-install-mysql-devel
然后,运行pip-install-MySQL-python
工作正常(激活了我的virtualenv)
看到这个答案了吗
(我发誓我在发布前搜索了大约1.5小时)
Resolving Dependencies
--> Running transaction check
---> Package mysql-devel.x86_64 0:5.1.73-3.el6_5 will be installed
--> Processing Dependency: mysql = 5.1.73-3.el6_5 for package: mysql-devel-5.1.73-3.el6_5.x86_64
--> Finished Dependency Resolution
Error: Package: mysql-devel-5.1.73-3.el6_5.x86_64 (base)
Requires: mysql = 5.1.73-3.el6_5
Installed: mysql-5.5.40-1.el6.remi.x86_64 (@remi)
mysql = 5.5.40-1.el6.remi
Available: mysql-5.1.73-3.el6_5.x86_64 (base)
mysql = 5.1.73-3.el6_5
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest