trying to install lxml on max osx leopard - python

I have tried lots of different guides.. this one gets me the furthest..
CFLAGS="$CFLAGS -lgcrypt -fPIC" STATIC_DEPS=true easy_install-2.6 lxml
however after installing all dependencies I get this error message over and over again:
install-NRDNAB/lxml-2.3/build/tmp/libxml2/lib/pkgconfig"
/usr/bin/install -c -m 644 libxslt.m4 '/private/tmp/easy_install-NRDNAB/lxml-2.3/build/tmp/libxml2/share/aclocal'
/usr/bin/install -c -m 644 xsltConf.sh '/private/tmp/easy_install-NRDNAB/lxml-2.3/build/tmp/libxml2/lib'
/usr/bin/install -c -m 644 libxslt.pc libexslt.pc '/private/tmp/easy_install-NRDNAB/lxml-2.3/build/tmp/libxml2/lib/pkgconfig'
Building without Cython.
Using build configuration of libxml2 2.7.8 and libxslt 1.1.26
Building against libxml2/libxslt in the following directory: /private/tmp/easy_install-NRDNAB/lxml-2.3/build/tmp/libxml2/lib
i686-apple-darwin10-gcc-4.2.1: -lgcrypt: linker input file unused because linking not done
i686-apple-darwin10-gcc-4.2.1: -lgcrypt: linker input file unused because linking not done
powerpc-apple-darwin10-gcc-4.2.1: -lgcrypt: linker input file unused because linking not done
powerpc-apple-darwin10-gcc-4.2.1: -lgcrypt: linker input file unused because linking not done
i686-apple-darwin10-gcc-4.2.1: -lgcrypt: linker input file unused because linking not done
i686-apple-darwin10-gcc-4.2.1: -lgcrypt: linker input file unused because linking not done
ld: library not found for -lgcrypt
collect2: ld returned 1 exit status
ld: library not found for -lgcrypt
collect2: ld returned 1 exit status
ld: library not found for -lgcrypt
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//ccZA43Kh.out (No such file or directory)
error: Setup script exited with error: command 'gcc-4.2' failed with exit status 1
sh-3.2#

This worked for me:
sudo env ARCHFLAGS="-arch i386 -arch x86_64" easy_install lxml

Related

readline does not install [mac]

My Mac updated recently and I noticed that readline functionality was missing in Python. I tried to reinstall it and got a cryptic error, which I cannot decode. I have already uninstalled and reinstalled XCode, and am at a loss.
The installation is a simple: pip install readline
and (part of) the error is:
Beginning configuration for readline-6.2 for i386-apple-darwin20.6.0
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name...
configure: error: in `/private/var/folders/gv/vxf1pd9x3mxc320ld73kkjfw0000gp/T/pip-install-eih2gt76/readline_fb5900c159cc42958f966f55a49321bf/rl/readline-lib':
configure: error: C compiler cannot create executables
See `config.log' for more details.
...
5 warnings generated.
creating build/lib.macosx-10.9-x86_64-cpython-38
gcc -bundle -undefined dynamic_lookup -L/Users/david/opt/miniconda3/lib -L/Users/david/opt/miniconda3/lib build/temp.macosx-10.9-x86_64-cpython-38/Modules/3.x/readline.o readline/libreadline.a readline/libhistory.a -lncurses -o build/lib.macosx-10.9-x86_64-cpython-38/readline.cpython-38-darwin.so -arch i386 -arch x86_64
clang: error: no such file or directory: 'readline/libreadline.a'
clang: error: no such file or directory: 'readline/libhistory.a'
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> readline
The answer for me was reinstalling a package called ncurses, which had become corrupt. Hopefully this helps someone else.

Cannot install atari-py on RedHat Enterprise server with c compiler broken error

I am trying to install atari-py of openai gym module and i get the below errors:
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /bin/cc
-- Check for working C compiler: /bin/cc -- broken
CMake Error at /root/.local/lib/python3.6/site-packages/cmake/data/share/cmake-3.12/Modules/CMakeTestCCompiler.cmake:52 (message):
The C compiler "/bin/cc" is not able to compile a simple test program.
It fails with the following output:
Change Dir: /tmp/pip-install-x2v7as8m/atari-py/atari_py/ale_interface/build/CMakeFiles/CMakeTmp
Run Build Command:"/bin/gmake" "cmTC_d4bba/fast"
gmake[1]: Entering directory `/tmp/pip-install-x2v7as8m/atari-py/atari_py/ale_interface/build/CMakeFiles/CMakeTmp'
/bin/gmake -f CMakeFiles/cmTC_d4bba.dir/build.make CMakeFiles/cmTC_d4bba.dir/build
gmake[2]: Entering directory `/tmp/pip-install-x2v7as8m/atari-py/atari_py/ale_interface/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_d4bba.dir/testCCompiler.c.o
/bin/cc -o CMakeFiles/cmTC_d4bba.dir/testCCompiler.c.o -c /tmp/pip-install-x2v7as8m/atari-py/atari_py/ale_interface/build/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_d4bba
/root/.local/lib/python3.6/site-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d4bba.dir/link.txt --verbose=1
/bin/cc -rdynamic CMakeFiles/cmTC_d4bba.dir/testCCompiler.c.o -o cmTC_d4bba
/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../libc.so when searching for -lc
/bin/ld: skipping incompatible //lib/libc.so when searching for -lc
/bin/ld: skipping incompatible //usr/lib/libc.so when searching for -lc
/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
gmake[2]: *** [cmTC_d4bba] Error 1
gmake[2]: Leaving directory `/tmp/pip-install-x2v7as8m/atari-py/atari_py/ale_interface/build/CMakeFiles/CMakeTmp'
gmake[1]: *** [cmTC_d4bba/fast] Error 2
gmake[1]: Leaving directory `/tmp/pip-install-x2v7as8m/atari-py/atari_py/ale_interface/build/CMakeFiles/CMakeTmp'
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
-- Configuring incomplete, errors occurred!
See also "/tmp/pip-install-x2v7as8m/atari-py/atari_py/ale_interface/build/CMakeFiles/CMakeOutput.log".
See also "/tmp/pip-install-x2v7as8m/atari-py/atari_py/ale_interface/build/CMakeFiles/CMakeError.log".
make: *** [build] Error 1
make: Leaving directory `/tmp/pip-install-x2v7as8m/atari-py/atari_py/ale_interface'
Could not build atari-py: Command '['make', 'build', '-C', 'atari_py/ale_interface', '-j', '47']' returned non-zero exit status 2.. (HINT: are you sure cmake is installed? You might also be missing a library. Atari-py requires: zlib [installable as 'apt-get install zlib1g-dev' on Ubuntu].)
The below are my system details.
Kernel: Linux 3.10.0-693.17.1.el7.x86_64 x86_64 GNU/Linux
OS: Red Hat Enterprise Linux Server release 7.4 (Maipo)
conda 4.5.11
Python 3.6.5 |Anaconda, Inc.| (default, Apr 29 2018, 16:14:56)
The most alarming thing is that it says c compiler is broken. Cmake is already installed using
yum install cmake
as well as
conda install cmake
Updated after installing glibc-static.
The new errors are below:
Linking C executable cmTryCompileExec2483823887
/usr/bin/cmake -E cmake_link_script
CMakeFiles/cmTryCompileExec2483823887.dir/link.txt --verbose=1
/bin/cc CMakeFiles/cmTryCompileExec2483823887.dir/testCCompiler.c.o -o
cmTryCompileExec2483823887 -rdynamic
/bin/ld: i386 architecture of input file
`/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../crt1.o' is incompatible
with i386:x86-64 output
/bin/ld: i386 architecture of input file
`/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../crti.o' is incompatible
with i386:x86-64 output
/bin/ld: i386 architecture of input file
`/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../crtn.o' is incompatible
with i386:x86-64 output
/bin/ld: dynamic STT_GNU_IFUNC symbol `strcmp' with pointer equality in
`/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc.a(strcmp.o)'
can not be used when making an executable; recompile with -fPIE and relink
with -pie
collect2: error: ld returned 1 exit status
gmake[2]: *** [cmTryCompileExec2483823887] Error 1
gmake[2]: Leaving directory
`/tmp/pip-install-3ilk445h/atari-py/atari_py/ale_interface/build/CMakeFiles/CMakeTmp'
gmake[1]: *** [cmTryCompileExec2483823887/fast] Error 2
gmake[1]: Leaving directory
`/tmp/pip-install-3ilk445h/atari-py/atari_py/ale_interface/build/CMakeFiles/CMakeTmp
CMake will not be able to correctly generate this project.

/usr/bin/ld: cannot find -lpython3.5m

I want to install tifffile package from terminal:
pip install tifffile
I am getting the following error
gcc -pthread -shared -L/home/l-01-314/anaconda3/lib -Wl,-rpath=/home/l-01-314/anaconda3/lib,--no-as-needed build/temp.linux-x86_64-3.5/tifffile/_tifffile.o -L/home/l-01-314/anaconda3/lib -lpython3.5m -o build/lib.linux-x86_64-3.5/tifffile/_tifffile.cpython-35m-x86_64-linux-gnu.so
/usr/bin/ld: cannot find -lpython3.5m
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
any idea why I am getting this error ?
solved, there was a wrong link from system gcc so I installed gcc for python anaconda via conda.
conda install -c anaconda gcc=4.8.5

command 'gcc' failed with exit status 1

I tried all answers but I can't solve the problem of installing Biopython package
I installed Mingw , but when I try to install the package : python setup.py install
I get the following error:
running install
running build
running build_py
running build_ext
building 'Bio.cpairwise2' extension
c:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Ic:\Python33\include -Ic:\Pytho
n33\include -c Bio/cpairwise2module.c -o build\temp.win-amd64-3.3\Release\bio\cp
airwise2module.o
writing build\temp.win-amd64-3.3\Release\bio\cpairwise2.def
c:\mingw\bin\gcc.exe -mno-cygwin -shared -s build\temp.win-amd64-3.3\Release\bio
\cpairwise2module.o build\temp.win-amd64-3.3\Release\bio\cpairwise2.def -Lc:\Pyt
hon33\libs -Lc:\Python33\PCbuild\amd64 -lpython33 -lmsvcr100 -o build\lib.win-am
d64-3.3\Bio\cpairwise2.pyd
c:/mingw/bin/../lib/gcc/mingw32/4.3.3/../../../../mingw32/bin/ld.exe: c:\Python3
3\libs/python33.lib(python33.dll): Recognised but unhandled machine type (0x8664
) in Import Library Format archive
c:/mingw/bin/../lib/gcc/mingw32/4.3.3/../../../../mingw32/bin/ld.exe: cannot fin
d -lmsvcr100
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
According to here for error: cannot find -lmsvcr100 you need to first install Microsoft Visual C++ 2010 Redistributable Package, and second, copy the msvcr100.dll to C:\Python33\libs the directory for linking is C:\Python44\libs because both -lpython and -lmsvcr100 are pointed to the same location during compilation, and so they have to be in the same directory.` This solution worked for me when I needed to install Cython.
You will get two errors. The first is yours:
error: cannot find -lmsvcr100
error: command 'gcc' failed with exit status 1
Then you will get a second error after you solve the first one:
error: unrecognized command line option '-mno-cygwin'
error: command 'gcc' failed with exit status 1
They are two different errors with two different solutions. You can find more here.

Incompatible libgmp.a error when building Pycrypto 2.6

I have build the gmp 5.1.1 library using gcc 4.7.2 all in the Windows-7 environment.
I configured the build with ./configure and commanded the make and after finished the
make check without any errors.
However, when I put the resulting libgmp.a into the Python33/libs and lunch the
c:\Users\egargio\Downloads\pycrypto-2.6\pycrypto-2.6>c:\Python33\python setup.py
build_ext --compiler=mingw32
the following errors reporting incompatibility for libgmp.a occur:
c:\Users\egargio\Downloads\pycrypto-2.6\pycrypto-2.6>c:\Python33\python setup.py
build_ext --compiler=mingw32
running build_ext
running build_configure
building 'Crypto.PublicKey._fastmath' extension
C:\MinGW64\bin\gcc.exe -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/
-Ic:\Python33\include -Ic:\Python33\include -c src/_fastmath.c -o build\temp.win
-amd64-3.3\Release\src\_fastmath.o
writing build\temp.win-amd64-3.3\Release\src\_fastmath.def
C:\MinGW64\bin\gcc.exe -shared -Wl,--enable-auto-image-base -s build\temp.win-am
d64-3.3\Release\src\_fastmath.o build\temp.win-amd64-3.3\Release\src\_fastmath.d
ef -Lc:\Python33\libs -Lc:\Python33\PCbuild\amd64 -lgmp -lpython33 -lmsvcr100 -o
build\lib.win-amd64-3.3\Crypto\PublicKey\_fastmath.pyd
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw3
2/bin/ld.exe: skipping incompatible c:\Python33\libs/libgmp.a when searching for
-lgmp
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw3
2/bin/ld.exe: skipping incompatible c:\Python33\libs\libgmp.a when searching for
-lgmp
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw3
2/bin/ld.exe: skipping incompatible c:\Python33\libs/libgmp.a when searching for
-lgmp
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw3
2/bin/ld.exe: cannot find -lgmp
collect2.exe: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
Please any suggestions ? Thanks.
-- Giorgio

Categories

Resources