简体   繁体   English

在Linux生产服务器中,当我尝试安装mysql-python模块时出现错误

[英]In the linux server for production i got error when i try to install mysql-python module

I have a one django app , And now i want send it to production linux server but when i try to install mysql-python module , I got this error : 我有一个django应用,现在我想将其发送到生产linux服务器,但是当我尝试安装mysql-python模块时,出现此错误:

> error: Setup script exited with error: Unable to find vcvarsall.bat

I know that , I can fix this error with installing visual studio in windows . 我知道,可以在Windows中安装Visual Studio来解决此错误。

but I don't know how can i fix this in linux , and i write this app with python 3.4 . 但是我不知道如何在linux中解决这个问题,我用python 3.4编写了这个程序。

I search all of stackoverflow , but i can't find anything for my problem . 我搜索了所有的stackoverflow,但是找不到我要解决的任何问题。

And i Try C++ compiler for python from microsoft but it can't solve my problem . 我尝试使用Microsoft的python的C ++编译器,但无法解决我的问题。

when I type pip install mysql-python i got this error : 当我输入pip install mysql-python出现此错误:

在此处输入图片说明 Thanks 谢谢

mysql-python does not support Python 3. Django recommends using mysqlclient . mysql-python不支持Python3。Django建议使用mysqlclient

See also Python 3 and MySQL . 另请参见Python 3和MySQL

pip install mysqlclient

Please also note that some packages are required. 另请注意,某些软件包是必需的。 Not entirely sure which from the following are specific to mysqlclient, but here is a list of the ones that I install in my servers anyway: 不能完全确定以下哪项是特定于mysqlclient的,但是下面列出了我仍然在服务器中安装的那些:

- build-essential
- python-mysqldb
- libmysqlclient-dev
- python3-dev

What is unclear in your question is the part about the ms compiler when the server is ubuntu. 您的问题中不清楚的是服务器为ubuntu时有关ms编译器的部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 以下是我尝试在 pycharm 中安装“mysql-python”时产生的错误。 任何帮助都会很棒 - Following is the error produced when I try to install "mysql-python" in pycharm. Any help would be great 我怎么能在我尝试输入pip install mysql-python的时候修复这个错误 - How can I fix this error very time I try type pip install mysql-python 当我想 pip 使用 MacOS 安装 mysql-python 和 mysqlclient 时出现错误消息 - Error messages when i want to pip install mysql-python and mysqlclient with MacOS 如何在具有Python 2.6的Linux系统上通过pip / virtualenv for Python 2.5安装MySQL-python? - How can I install MySQL-python via pip/virtualenv for Python 2.5 on a Linux system with Python 2.6? 每当我尝试为python模块安装mysql时,此错误是什么? - What is this error whenever I try to install mysql for python module? 当我尝试在 python 上安装模块时,错误不断出现 - Error keeps on showing up when i try to install a module on python 在Linux中pip安装MySQL-python失败 - pip install MySQL-python failed in linux 如何成功安装 mysql 和 mysql-python 连接器? - How do I successfully install mysql and mysql-python connector? 如何为python2.7安装mysql-python - How do I install mysql-python for python2.7 尝试在 mac 上安装 MySQL-python 时不断返回错误 - Keep returning error when trying to install MySQL-python on mac
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM