小编agu*_*pgc的帖子

在OSX,virtualenv中使用pip install安装MySQL-python时出错

首先我正在开发一个django应用程序,当我尝试运行服务器时:

python manage.py runserver 0.0.0.0:8000

终端显示:

 "django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb"
Run Code Online (Sandbox Code Playgroud)

所以,我需要安装该包:

(app1)Me% pip install MySQL-python
Run Code Online (Sandbox Code Playgroud)

错误:

Collecting mysql-python
  Using cached MySQL-python-1.2.5.zip
Building wheels for collected packages: mysql-python
  Running setup.py bdist_wheel for mysql-python
  Complete output from command /Users/GFTecla/Documents/shoutout/bin/python -c "import setuptools;__file__='/private/var/folders/9g/1qrws9yj3wn7lghlrpgyh9cc0000gn/T/pip-build-ZMQOQm/mysql-python/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /var/folders/9g/1qrws9yj3wn7lghlrpgyh9cc0000gn/T/tmp1JfTpfpip-wheel-:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.5-intel-2.7
  copying _mysql_exceptions.py -> build/lib.macosx-10.5-intel-2.7
  creating build/lib.macosx-10.5-intel-2.7/MySQLdb
  copying MySQLdb/__init__.py -> build/lib.macosx-10.5-intel-2.7/MySQLdb
  copying MySQLdb/converters.py -> build/lib.macosx-10.5-intel-2.7/MySQLdb
  copying MySQLdb/connections.py -> build/lib.macosx-10.5-intel-2.7/MySQLdb
  copying …
Run Code Online (Sandbox Code Playgroud)

mysql macos pip virtualenv

8
推荐指数
1
解决办法
6356
查看次数

标签 统计

macos ×1

mysql ×1

pip ×1

virtualenv ×1