以下是我尝试安装的要求:
Django==1.9.6
gunicorn==17.5
gevent
Flask==0.11
Flask-SQLAlchemy==2.1
Flask-OAuth==0.12
Jinja2==2.8
MarkupSafe==0.23
MySQL-python==1.2.4b4
itsdangerous==0.24
nltk==3.2
numpy==1.8.2
oauth2==1.9.0.post1
oauthlib==0.6.1
pandas==0.13.1
pyOpenSSL==0.13
pycurl==7.19.3
requests==2.2.1
scikit-learn==0.14.1
scipy==0.13.3
simplejson==3.3.1
psycopg2==2.6.1
SQLAlchemy==1.0.12
Werkzeug==0.11.9
redis==2.10.5
我使用了命令:
pip install -r requirements.txt
以下是遇到的错误:
Collecting Django==1.9.6 (from -r requirements.txt (line 1))
Using cached Django-1.9.6-py2.py3-none-any.whl
Collecting gunicorn==17.5 (from -r requirements.txt (line 2))
Using cached gunicorn-17.5.tar.gz
Collecting gevent (from -r requirements.txt (line 3))
Using cached gevent-1.2.2-cp35-cp35m-win_amd64.whl
Collecting Flask==0.11 (from -r requirements.txt (line 4))
Using cached Flask-0.11-py2.py3-none-any.whl
Collecting Flask-SQLAlchemy==2.1 (from -r requirements.txt (line 5))
Using cached Flask-SQLAlchemy-2.1.tar.gz
Requirement already satisfied: Flask-OAuth==0.12 in c:\python35\lib\site-packages (from -r requirements.txt (line 6))
Collecting Jinja2==2.8 (from -r requirements.txt (line 7))
Using cached Jinja2-2.8-py2.py3-none-any.whl
Collecting MarkupSafe==0.23 (from -r requirements.txt (line 8))
Using cached MarkupSafe-0.23.tar.gz
Collecting MySQL-python==1.2.4b4 (from -r requirements.txt (line 9))
Using cached MySQL-python-1.2.4b4.zip
Complete output from command python setup.py egg_info:
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz
Extracting in C:\Users\LENOVO~1\AppData\Local\Temp\tmpgw32ylav
Traceback (most recent call last):
File "C:\Users\LENOVO~1\AppData\Local\Temp\pip-build-3n4ps1ef\MySQL-python\distribute_setup.py", line 143, in use_setuptools
raise ImportError
ImportError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\LENOVO~1\AppData\Local\Temp\pip-build-3n4ps1ef\MySQL-python\setup.py", line 7, in <module>
use_setuptools()
File "C:\Users\LENOVO~1\AppData\Local\Temp\pip-build-3n4ps1ef\MySQL-python\distribute_setup.py", line 145, in use_setuptools
return _do_download(version, download_base, to_dir, download_delay)
File "C:\Users\LENOVO~1\AppData\Local\Temp\pip-build-3n4ps1ef\MySQL-python\distribute_setup.py", line 125, in _do_download
_build_egg(egg, tarball, to_dir)
File "C:\Users\LENOVO~1\AppData\Local\Temp\pip-build-3n4ps1ef\MySQL-python\distribute_setup.py", line 99, in _build_egg
_extractall(tar)
File "C:\Users\LENOVO~1\AppData\Local\Temp\pip-build-3n4ps1ef\MySQL-python\distribute_setup.py", line 486, in _extractall
self.chown(tarinfo, dirpath)
TypeError: chown() missing 1 required positional argument: 'numeric_owner'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\LENOVO~1\AppData\Local\Temp\pip-build-3n4ps1ef\MySQL-python\
我正在使用带有Python3.5的Windows 10操作系统。
请帮助我。
答案 0 :(得分:1)
这不是该问题的直接解决方案,但是如果您的解决方案不一定必须使用此库,则还有其他一些MySQL库可以帮助您跳过此问题。例如,您可以尝试pymysql
。
答案 1 :(得分:1)
MySQL-python与我在pypi上看到的不兼容python3。