Skip to content
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

adding requirement for Mac OS #143

Merged
merged 2 commits into from
Jan 26, 2017
Merged

adding requirement for Mac OS #143

merged 2 commits into from
Jan 26, 2017

Conversation

ardinusawan
Copy link
Contributor

Im trying this in my mac, and work!
Hope this help

@methane methane merged commit 50a81b1 into PyMySQL:master Jan 26, 2017
@methane
Copy link
Member

methane commented Jan 26, 2017

thanks

@PaleoWoods
Copy link

Is there any problem with my virtualenv? I have a problem installing mysqlclient
image

madOS Sierra 10.12.4
anybody help me? Thanks very much!!

@methane
Copy link
Member

methane commented May 16, 2017 via email

@PaleoWoods
Copy link

@methane
Thank you very much! (found this issue through Search Engine. )
I found solution in issue #169 . Sorry for bothering you.

brief solution for later-comers:
i) modify file: /usr/local/bin/mysql_config (which mysql_config)
origin:
# Create options libs="-L$pkglibdir" libs="$libs -l "
modified to
# Create options libs="-L$pkglibdir" libs="$libs -lmysqlclient -lssl -lcrypto"
ii)add environment veriables(brew info openssl)
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"
iii)pip install mysqlclient
successed!

thank you.

@reach009
Copy link

Command "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c "import setuptools, tokenize;file='/private/var/folders/5v/whz01gcs29518gly2s1k76t80000gn/T/pip-install-n4seovbq/mysqlclient/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /private/var/folders/5v/whz01gcs29518gly2s1k76t80000gn/T/pip-record-20soowiu/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/5v/whz01gcs29518gly2s1k76t80000gn/T/pip-install-n4seovbq/mysqlclient/

@reach009
Copy link

@PaleoWoods : I tried your method, but it gives me this error.

`Collecting mysqlclient
Using cached https://files.pythonhosted.org/packages/73/79/67ddf24ac31b05d741f0ac87fa612c7a11bab1b39b8270ed7344d149f8af/mysqlclient-1.4.2.tar.gz
Installing collected packages: mysqlclient
Running setup.py install for mysqlclient ... error
Complete output from command /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c "import setuptools, tokenize;file='/private/var/folders/5v/whz01gcs29518gly2s1k76t80000gn/T/pip-install-n4seovbq/mysqlclient/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /private/var/folders/5v/whz01gcs29518gly2s1k76t80000gn/T/pip-record-20soowiu/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.7
creating build/lib.macosx-10.9-x86_64-3.7/MySQLdb
copying MySQLdb/init.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb
copying MySQLdb/exceptions.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb
copying MySQLdb/compat.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb
copying MySQLdb/release.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb
copying MySQLdb/times.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb
creating build/lib.macosx-10.9-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/init.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.9-x86_64-3.7/MySQLdb/constants
running build_ext
building 'MySQLdb.mysql' extension
creating build/temp.macosx-10.9-x86_64-3.7
creating build/temp.macosx-10.9-x86_64-3.7/MySQLdb
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Dversion_info=(1,4,2,'final',0) -D__version
=1.4.2 -I/usr/local/Cellar/mysql/8.0.15/include/mysql -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c MySQLdb/_mysql.c -o build/temp.macosx-10.9-x86_64-3.7/MySQLdb/_mysql.o
gcc -bundle -undefined dynamic_lookup -arch x86_64 -g build/temp.macosx-10.9-x86_64-3.7/MySQLdb/_mysql.o -L/usr/local/Cellar/mysql/8.0.15/lib -lmysqlclient -lssl -lcrypto -o build/lib.macosx-10.9-x86_64-3.7/MySQLdb/_mysql.cpython-37m-darwin.so
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'gcc' failed with exit status 1

----------------------------------------

Command "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c "import setuptools, tokenize;file='/private/var/folders/5v/whz01gcs29518gly2s1k76t80000gn/T/pip-install-n4seovbq/mysqlclient/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /private/var/folders/5v/whz01gcs29518gly2s1k76t80000gn/T/pip-record-20soowiu/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/5v/whz01gcs29518gly2s1k76t80000gn/T/pip-install-n4seovbq/mysqlclient/`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants