简体   繁体   中英

can't install mysql-connector on Python 3.5.3 with pip3

I have successfully installed mysql-connector using 'pip install mysql-connector', however it installs to the Mac OSX standard version of Python (2.7).

I need it installed to my latest version of Python (3.5.3).

When I use 'pip3 install mysql-connector' or 'pip3 install --allow-external mysql-connector mysql-connector' I get the following errors:

Error 1:
Failed building wheel for mysql-connector

Error 2:
Command "/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/private/var/folders/ch/vzgxn0n119zggbgnb0_vg5400000gn/T/pip-build-po0zonwm/mysql-connector/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/ch/vzgxn0n119zggbgnb0_vg5400000gn/T/pip-q6b3vmy3-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/ch/vzgxn0n119zggbgnb0_vg5400000gn/T/pip-build-po0zonwm/mysql-connector/

Does anyone know how to resolve this problem? I don't want to have to switch back to Python 2.7.

Thanks.

这将做的事情:

pip3 install mysql-connector-python

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM