小编cod*_*oob的帖子

在 cPanel 上的 django 项目中安装 mysqlclient 时出错

几天来我一直在努力解决这个问题。我正在尝试将我的 Django 项目放入 cPanel 上的 venv 中并安装 mysqlclient。因此,在 Cpanel 上设置 Python(版本 = 3.7.8)后,我使用pip install django和从终端安装了 Django 版本 3.1.7 和 mysqlclient pip install mysqlclient。但是,当我尝试安装 mysqlclient 时,会弹出此错误。

  Using cached mysqlclient-2.0.3.tar.gz (88 kB)
Building wheels for collected packages: mysqlclient
  Building wheel for mysqlclient (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/canggihmallmy/virtualenv/django_test/3.7/bin/python3.7_bin -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ct08p_k4/mysqlclient_5cd61bc8b4de40efb5731cfe082b4d65/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ct08p_k4/mysqlclient_5cd61bc8b4de40efb5731cfe082b4d65/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))'bdist_wheel -d /tmp/pip-wheel-scx4wswm
       cwd: /tmp/pip-install-ct08p_k4/mysqlclient_5cd61bc8b4de40efb5731cfe082b4d65/
  Complete output (43 lines):
  mysql_config …
Run Code Online (Sandbox Code Playgroud)

python gcc cpanel mysql-connector

4
推荐指数
1
解决办法
4166
查看次数

标签 统计

cpanel ×1

gcc ×1

mysql-connector ×1

python ×1