I'm following these instructions for setting up cx_Freeze on Mac OS X in the Terminal: http://martinfitzpatrick.name/article/cx-freeze-and-pyside-on-mac/
When I type: pip install cx_Freeze
I just get a wall of output ending with:
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'gcc' failed with exit status 1
Any ideas?
Related
I am trying to install the requirements for odoo15 on my MBP M1 Pro running MacOS Ventura 13.0 in my virtual environment running python 3.10.8
but I keep getting the following error:
build/temp.macosx-12-arm64-cpython-310/_openssl.c:575:10: fatal error: 'openssl/opensslv.h' file not found
#include <openssl/opensslv.h>
^~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for cryptography
Building wheel for psycopg2 (setup.py) ... error
error: subprocess-exited-with-error
...
ld: warning: directory not found for option '-L/usr/local/opt/openssl/lib'
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for psycopg2
Running setup.py clean for psycopg2
...
Failed to build cryptography psycopg2
ERROR: Could not build wheels for cryptography, which is required to install pyproject.toml-based projects
Now, I have already spent a lot of time researching and it seems that openssl might be the problem here
I have already install openssl via brew, it is running the newest version, as suggested in this GitHub issue
I have installed the newest version of pip as suggested in this StackOverflow post
Edit: I have now also tried setting these flags as suggested in this StackOverflow post:
export LDFLAGS="-L/opt/homebrew/opt/openssl#1.1/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl#1.1/include"
I have also retried everything in another venv using Python version 3.8
Since I upgraded macOS to Monterey, I couldn’t compile the Cython file with this command:
python setup.py build_ext --inplace.
I’m getting this error:
ld: unsupported tapi file type '!tapi-tbd' in YAML file '/opt/MacOSX11.3.sdk/usr/lib/libSystem.tbd' for architecture x86_64 clang-10: error: linker command failed with exit code 1 (use -v to see invocation) error: command 'x86_64-apple-darwin13.4.0-clang' failed with exit status 1
How can I fix it?
I have been trying to migrate python models into a mysql database. When ever I issue the following command in terminal:
(sl_env) Nolans-MBP:student_loans NolanMorrow$ python3 manage.py makemigrations
I get
django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3.'''
At which point I enter
(sl_env) Nolans-MBP:student_loans NolanMorrow$ pip3 install mysqlclient
and get the following error.
Running setup.py install for mysqlclient ... error
...
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
I am using anaconda py3.6, with conda's mingw32.
I set mingw32 as the compiler, also modified cygwinccompiler.py as suggested in Building minimal cython file with python 3.3 (Anaconda) under windows 7 .
Now I still can't build any binary pyd module, they all failed at the linking step with similar error.
C:\ProgramData\Anaconda3\Scripts\gcc.bat -shared -s build\temp.win32-3.6\Release\cymysql\packet.o build\temp.win32-3.6\Release\cymysql\packet.cp36-win32.def -LC:\ProgramData\Anaconda3\libs -LC:\ProgramData\Anaconda3\PCbuild\win32 -lpython36 -lmsvcr140 -o build\lib.win32-3.6\cymysql\packet.cp36-win32.pyd c:/programdata/anaconda3/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-mingw32/bin/ld.exe: build\temp.win32-3.6\Release\cymysql\packet.cp36-win32.def:1: syntax error
c:/programdata/anaconda3/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-mingw32/bin/ld.exe:build\temp.win32-3.6\Release\cymysql\packet.cp36-win32.def: file format not recognized; treating as linker script
c:/programdata/anaconda3/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-mingw32/bin/ld.exe:build\temp.win32-3.6\Release\cymysql\packet.cp36-win32.def:1: syntax error
collect2.exe: error: ld returned 1 exit status error: command 'C:\\ProgramData\\Anaconda3\\Scripts\\gcc.bat' failed with exit status 1
another example:
(base) D:\pymssql-build\pymssql>gcc -shared -s build\temp.win32-3.6\Release\_mssql.o build\temp.win32-3.6\Release\_mssql.cp36-win32.def -LC:\ProgramData\Anaconda3\Library\mingw-w64\lib -LC:\ProgramData\Anaconda3\Library\lib -LD:\pymssql-build\pymssql\freetds\ming_32\lib-nossl -LC:\ProgramData\Anaconda3\libs -LC:\ProgramData\Anaconda3\PCbuild\win32 -llibiconv -liconv -lsybdb -lws2_32 -lwsock32 -lkernel32 -lpython36 -lmsvcr140 -o build\lib.win32-3.6\_mssql.cp36-win32.pyd
c:/programdata/anaconda3/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-mingw32/bin/ld.exe: build\temp.win32-3.6\Release\_mssql.cp36-win32.def:1: syntax error
c:/programdata/anaconda3/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-mingw32/bin/ld.exe:build\temp.win32-3.6\Release\_mssql.cp36-win32.def: file format not recognized; treating as linker script
c:/programdata/anaconda3/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-mingw32/bin/ld.exe:build\temp.win32-3.6\Release\_mssql.cp36-win32.def:1: syntax error
collect2.exe: error: ld returned 1 exit status
While the def files looks just fine to me:
LIBRARY _mssql.cp36-win32.pyd
EXPORTS
PyInit__mssql
_mssql.o size: 507kb
Trying to install a compiled Python package on a 64-bit Windows machine using MinGW compiler. The same install succeeded on my 32-bit machine but failed on two different 64-bit machines:
C:\Python\Scripts> pip install python-Levenshtein
C:\Python\libs/python33.lib: error adding symbols: File in wrong format
collect2.exe: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
Trying from a cloned copy:
$ python setup.py build
C:\Python\libs/python33.lib: error adding symbols: File in wrong format
collect2.exe: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
Running the build command by itself:
$ gcc.exe -shared -s 'build\temp.win-amd64-3.3\Release\levenshtein\_levenshtein.o' 'build\temp.win-amd64-3.3\Release\levenshtein\_levenshtein.def' -LC:'\Python\libs' -LC:'\Python\PCbuild\amd64' -lpython33 -lmsvcr100 -o 'build\lib.win-amd64-3.3\Levenshtein\_levenshtein.pyd'
C:\Python\libs/python33.lib: error adding symbols: File in wrong format
collect2.exe: error: ld returned 1 exit status
$ file 'C:\Python\libs/python33.lib'
C:\Python\libs/python33.lib: current ar archive
Thank you
- Muposat