[英]MYSQL 0.0.2 package is not installing when running pip install -r requirements.txt
I am trying to install the 'mysql' package ( Version 0.0.2) , using pip install -r requirements.txt
我正在尝试使用pip install -r requirements.txt
安装“mysql”包(版本 0.0.2)
But I am facing the following error:但我面临以下错误:
Collecting mysql==0.0.2
Using cached mysql-0.0.2.tar.gz (1.9 kB)
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/pwiwdipw/virtualenv/ITC/3.6/bin/python3.6_bin -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-sbgj4igk/mysql_4feada7a9dca4cc6b8bf0981676447ec/setup.py'"'"'; __file__='"'"'/tmp/pip-install-sbgj4igk/mysql_4feada7a9dca4cc6b8bf0981676447ec/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup;setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-yaqwy2z8
cwd: /tmp/pip-install-sbgj4igk/mysql_4feada7a9dca4cc6b8bf0981676447ec/
Complete output (28 lines):
WARNING: `mysql` is a virtual package. Please use `%s` as a dependency directly.
running egg_info
creating /tmp/pip-pip-egg-info-yaqwy2z8/mysql.egg-info
writing /tmp/pip-pip-egg-info-yaqwy2z8/mysql.egg-info/PKG-INFO
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-sbgj4igk/mysql_4feada7a9dca4cc6b8bf0981676447ec/setup.py", line 42, in <module>
url="https://github.com/valhallasw/virtual-mysql-pypi-package",
File "/home/pwiwdipw/virtualenv/ITC/3.6/lib/python3.6/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/opt/alt/python36/lib64/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/opt/alt/python36/lib64/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/opt/alt/python36/lib64/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/pwiwdipw/virtualenv/ITC/3.6/lib/python3.6/site-packages/setuptools/command/egg_info.py", line 292, in run
writer(self, ep.name, os.path.join(self.egg_info, ep.name))
File "/home/pwiwdipw/virtualenv/ITC/3.6/lib/python3.6/site-packages/setuptools/command/egg_info.py", line 656, in write_pkg_info
metadata.write_pkg_info(cmd.egg_info)
File "/opt/alt/python36/lib64/python3.6/distutils/dist.py", line 1106, in write_pkg_info
self.write_pkg_file(pkg_info)
File "/home/pwiwdipw/virtualenv/ITC/3.6/lib/python3.6/site-packages/setuptools/dist.py", line 188, in write_pkg_file
license = rfc822_escape(self.get_license())
File "/opt/alt/python36/lib64/python3.6/distutils/util.py", line 474, in rfc822_escape
lines = header.split('\n')
AttributeError: 'list' object has no attribute 'split'
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/bf/5f/b574ac9f70811df0540e403309f349a8b9fa1a25d3653824c32e52cc1f28/mysql-0.0.2.tar.gz#sha256=55e66b5e7b3823b1da5fb2a063e95a628fb850b2a0b76bdcd884faac5d2daa7d(from https://pypi.org/simple/mysql/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement mysql==0.0.2 (from versions: 0.0.1, 0.0.2, 0.0.3)
ERROR: No matching distribution found for mysql==0.0.2
Steps taken to try to solve the issue:为尝试解决该问题而采取的步骤:
1.I have tried changing the versions , yet the package is still not installing. 1.我已经尝试更改版本,但软件包仍然没有安装。
2.Manually trying to install it , using pip install mysql==0.0.2, instead of installing from requirements.txt 2.手动尝试安装它,使用 pip install mysql==0.0.2,而不是从 requirements.txt 安装
How do I solve this?我该如何解决这个问题?
Thank you谢谢
Please follow that package's instructions:请按照该包裹的说明进行操作:
https://pypi.org/project/mysql https://pypi.org/project/mysql
mysql 0.0.3 mysql 0.0.3
... or mysqlclient (Python 3) ... ... 或 mysqlclient (Python 3) ...
Instead of depending on this package, please depend on the relevant package directly.不要依赖这个包,请直接依赖相关包。
This means installing https://anaconda.org/conda-forge/mysqlclient , for which conda will install both the pure python code and the binary dependencies.这意味着安装https://anaconda.org/conda-forge/mysqlclient , conda将为此安装纯 python 代码和二进制依赖项。 Conda won't require you to have a working gcc
compiler installed. Conda 不要求您安装工作的gcc
编译器。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.