小编Dav*_*eno的帖子

在Ubuntu 18.04上为python安装mysqlclient时出错

我在Ubuntu上安装了Python 2.7.15rci和Python 3.6.7。当我在virtualenv上执行“点列表”时,它返回我:

Django (2.1.5)
pip (9.0.1)
pkg-resources (0.0.0)
pytz (2018.9)
setuptools (39.0.1)
wheel (0.32.3)
Run Code Online (Sandbox Code Playgroud)

我正在尝试安装mysqlclient(pip install mysqlclient)并返回错误。

  unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for mysqlclient
  Running setup.py clean for mysqlclient
Failed to build mysqlclient
Installing collected packages: mysqlclient
  Running setup.py install for mysqlclient ... error
    Complete output from command /home/david/env/project/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-pq18uxjj/mysqlclient/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-y28h4ou0-record/install-record.txt --single-version-externally-managed …
Run Code Online (Sandbox Code Playgroud)

mysql django pip mysql-python python-3.x

3
推荐指数
3
解决办法
1891
查看次数

标签 统计

django ×1

mysql ×1

mysql-python ×1

pip ×1

python-3.x ×1