New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed building wheel for mysqlclient #74

Closed
epicserve opened this Issue Feb 10, 2016 · 7 comments

Comments

Projects
None yet
5 participants
@epicserve
Copy link

epicserve commented Feb 10, 2016

I'm using Python 3.5.1 and pip 8.0.2 on OS X that I installed using pyenv. When installing mysqlclient I get the error "Failed building wheel for mysqlclient". The following is my terminal output.

$ pip install mysqlclient==1.3.7
Collecting mysqlclient==1.3.7
  Using cached mysqlclient-1.3.7.tar.gz
Building wheels for collected packages: mysqlclient
  Running setup.py bdist_wheel for mysqlclient ... error
  Complete output from command /Users/brento/.virtualenvs/pears-py3/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/private/var/folders/q8/nr7dx6213ld0p451xxqm138h0000gp/T/pip-build-rayxd4we/mysqlclient/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /var/folders/q8/nr7dx6213ld0p451xxqm138h0000gp/T/tmpvg5zyj7upip-wheel- --python-tag cp35:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.11-x86_64-3.5
  copying _mysql_exceptions.py -> build/lib.macosx-10.11-x86_64-3.5
  creating build/lib.macosx-10.11-x86_64-3.5/MySQLdb
  copying MySQLdb/__init__.py -> build/lib.macosx-10.11-x86_64-3.5/MySQLdb
  copying MySQLdb/compat.py -> build/lib.macosx-10.11-x86_64-3.5/MySQLdb
  copying MySQLdb/converters.py -> build/lib.macosx-10.11-x86_64-3.5/MySQLdb
  copying MySQLdb/connections.py -> build/lib.macosx-10.11-x86_64-3.5/MySQLdb
  copying MySQLdb/cursors.py -> build/lib.macosx-10.11-x86_64-3.5/MySQLdb
  copying MySQLdb/release.py -> build/lib.macosx-10.11-x86_64-3.5/MySQLdb
  copying MySQLdb/times.py -> build/lib.macosx-10.11-x86_64-3.5/MySQLdb
  creating build/lib.macosx-10.11-x86_64-3.5/MySQLdb/constants
  copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.11-x86_64-3.5/MySQLdb/constants
  copying MySQLdb/constants/CR.py -> build/lib.macosx-10.11-x86_64-3.5/MySQLdb/constants
  copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.11-x86_64-3.5/MySQLdb/constants
  copying MySQLdb/constants/ER.py -> build/lib.macosx-10.11-x86_64-3.5/MySQLdb/constants
  copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.11-x86_64-3.5/MySQLdb/constants
  copying MySQLdb/constants/REFRESH.py -> build/lib.macosx-10.11-x86_64-3.5/MySQLdb/constants
  copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.11-x86_64-3.5/MySQLdb/constants
  running build_ext
  building '_mysql' extension
  creating build/temp.macosx-10.11-x86_64-3.5
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -Dversion_info=(1,3,7,'final',1) -D__version__=1.3.7 -I/usr/local/Cellar/mysql/5.7.10/include/mysql -I/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/include/python3.5m -c _mysql.c -o build/temp.macosx-10.11-x86_64-3.5/_mysql.o -fno-omit-frame-pointer
  clang -bundle -undefined dynamic_lookup -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk build/temp.macosx-10.11-x86_64-3.5/_mysql.o -L/usr/local/Cellar/mysql/5.7.10/lib -lmysqlclient -lssl -lcrypto -o build/lib.macosx-10.11-x86_64-3.5/_mysql.cpython-35m-darwin.so
  installing to build/bdist.macosx-10.11-x86_64/wheel
  running install
  running install_lib
  creating build/bdist.macosx-10.11-x86_64
  creating build/bdist.macosx-10.11-x86_64/wheel
  copying build/lib.macosx-10.11-x86_64-3.5/_mysql.cpython-35m-darwin.so -> build/bdist.macosx-10.11-x86_64/wheel
  copying build/lib.macosx-10.11-x86_64-3.5/_mysql_exceptions.py -> build/bdist.macosx-10.11-x86_64/wheel
  creating build/bdist.macosx-10.11-x86_64/wheel/MySQLdb
  copying build/lib.macosx-10.11-x86_64-3.5/MySQLdb/__init__.py -> build/bdist.macosx-10.11-x86_64/wheel/MySQLdb
  copying build/lib.macosx-10.11-x86_64-3.5/MySQLdb/compat.py -> build/bdist.macosx-10.11-x86_64/wheel/MySQLdb
  copying build/lib.macosx-10.11-x86_64-3.5/MySQLdb/connections.py -> build/bdist.macosx-10.11-x86_64/wheel/MySQLdb
  creating build/bdist.macosx-10.11-x86_64/wheel/MySQLdb/constants
  copying build/lib.macosx-10.11-x86_64-3.5/MySQLdb/constants/__init__.py -> build/bdist.macosx-10.11-x86_64/wheel/MySQLdb/constants
  copying build/lib.macosx-10.11-x86_64-3.5/MySQLdb/constants/CLIENT.py -> build/bdist.macosx-10.11-x86_64/wheel/MySQLdb/constants
  copying build/lib.macosx-10.11-x86_64-3.5/MySQLdb/constants/CR.py -> build/bdist.macosx-10.11-x86_64/wheel/MySQLdb/constants
  copying build/lib.macosx-10.11-x86_64-3.5/MySQLdb/constants/ER.py -> build/bdist.macosx-10.11-x86_64/wheel/MySQLdb/constants
  copying build/lib.macosx-10.11-x86_64-3.5/MySQLdb/constants/FIELD_TYPE.py -> build/bdist.macosx-10.11-x86_64/wheel/MySQLdb/constants
  copying build/lib.macosx-10.11-x86_64-3.5/MySQLdb/constants/FLAG.py -> build/bdist.macosx-10.11-x86_64/wheel/MySQLdb/constants
  copying build/lib.macosx-10.11-x86_64-3.5/MySQLdb/constants/REFRESH.py -> build/bdist.macosx-10.11-x86_64/wheel/MySQLdb/constants
  copying build/lib.macosx-10.11-x86_64-3.5/MySQLdb/converters.py -> build/bdist.macosx-10.11-x86_64/wheel/MySQLdb
  copying build/lib.macosx-10.11-x86_64-3.5/MySQLdb/cursors.py -> build/bdist.macosx-10.11-x86_64/wheel/MySQLdb
  copying build/lib.macosx-10.11-x86_64-3.5/MySQLdb/release.py -> build/bdist.macosx-10.11-x86_64/wheel/MySQLdb
  copying build/lib.macosx-10.11-x86_64-3.5/MySQLdb/times.py -> build/bdist.macosx-10.11-x86_64/wheel/MySQLdb
  running install_egg_info
  running egg_info
  writing top-level names to mysqlclient.egg-info/top_level.txt
  writing dependency_links to mysqlclient.egg-info/dependency_links.txt
  writing mysqlclient.egg-info/PKG-INFO
  warning: manifest_maker: standard file '-c' not found

  reading manifest file 'mysqlclient.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  writing manifest file 'mysqlclient.egg-info/SOURCES.txt'
  Copying mysqlclient.egg-info to build/bdist.macosx-10.11-x86_64/wheel/mysqlclient-1.3.7-py3.5.egg-info
  running install_scripts
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/private/var/folders/q8/nr7dx6213ld0p451xxqm138h0000gp/T/pip-build-rayxd4we/mysqlclient/setup.py", line 21, in <module>
      setuptools.setup(**metadata)
    File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/Users/brento/.virtualenvs/pears-py3/lib/python3.5/site-packages/wheel/bdist_wheel.py", line 213, in run
      archive_basename = self.get_archive_basename()
    File "/Users/brento/.virtualenvs/pears-py3/lib/python3.5/site-packages/wheel/bdist_wheel.py", line 161, in get_archive_basename
      impl_tag, abi_tag, plat_tag = self.get_tag()
    File "/Users/brento/.virtualenvs/pears-py3/lib/python3.5/site-packages/wheel/bdist_wheel.py", line 155, in get_tag
      assert tag == supported_tags[0]
  AssertionError

  ----------------------------------------
  Failed building wheel for mysqlclient
  Running setup.py clean for mysqlclient
Failed to build mysqlclient
Installing collected packages: mysqlclient
  Found existing installation: mysqlclient 1.3.6
    Uninstalling mysqlclient-1.3.6:
      Successfully uninstalled mysqlclient-1.3.6
  Running setup.py install for mysqlclient ... done
Successfully installed mysqlclient-1.3.7
@methane

This comment has been minimized.

Copy link
Member

methane commented Feb 11, 2016

pip install -U wheel will fix your problem.

@epicserve

This comment has been minimized.

Copy link
Author

epicserve commented Feb 11, 2016

Shouldn't this library be updated to work without having to use that extra flag?

@methane

This comment has been minimized.

Copy link
Member

methane commented Feb 11, 2016

What the extra frag means?
This is a compatibility problem between old wheel and Python 3.5.

https://bitbucket.org/pypa/wheel/issues/146/wheel-building-fails-on-cpython-350b3

@methane methane closed this Feb 11, 2016

@luizs81

This comment has been minimized.

Copy link

luizs81 commented Dec 21, 2016

In case someone finds this page, what worked for me was reinstalling the XCode command line tools:

xcode-select --install

@methane

This comment has been minimized.

Copy link
Member

methane commented Dec 21, 2016

@JayeshVaghasiya

This comment has been minimized.

Copy link

JayeshVaghasiya commented Mar 13, 2017

Download the pre-compiled whl file for mysql from from Christophe Gohlke’s Library of pre-compiled python packages for windows from the below location.

http://www.lfd.uci.edu/~gohlke/pythonlibs/#vlfd

Now got to directory where you downloaded that file and open command prompt there.

Now run below command

pip install xxx.whl

Best Luck !!

@arunkkumar2207j

This comment has been minimized.

Copy link

arunkkumar2207j commented Jan 26, 2019

I was successfully in installing for python 3.7.2

pip install mysqlclient-1.4.1-cp37-cp37m-win32.whl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment