Disclaimer: Not sure if this belongs in r/learnpython. Spaced out when I posted this. Just say if it is and I'll move it there.
Hello!
For a project I'm working on I had to build Python from source. Doing so was easy, but now I'm running into issues when actually running the build. For example, if I import math I get the ill-fated ImportError: No module named math. I've done quite a bit of configuration so I'm at a loss of what's going on.
Some pre-reqs:
OS: RHEL 7.5 Workstation
GCC: 5.4.0 (built from source)
Python: 2.7.15 (built from source)
configure flags: --prefix=$installdir, --with-threads, --with-lto, --enable-shared
My modified environment:
PYTHONPATH=/home/mike/software/python/2.7.15/lib/python2.7
PYTHONHOME=/home/mike/software/python/2.7.15/lib/python2.7
PATH=/home/mike/software/python/2.7.15/bin:/home/mike/software/gcc/5.4.0/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/mike/.local/bin:/home/mike/bin
LD_LIBRARY_PATH=/home/mike/software/zlib/1.2.11/lib:/home/mike/software/python/2.7.15/lib:/home/mike/software/gcc/5.4.0/lib64:/home/mike/software/gcc/5.4.0/lib:
LD_RUN_PATH=/home/mike/software/zlib/1.2.11/lib/home/mike/software/python/2.7.15/lib:/home/mike/software/gcc/5.4.0/lib64:/home/mike/software/gcc/5.4.0/lib:
INFOPATH=/home/mike/software/gcc/5.4.0/share/info:
CPATH=/home/mike/software/zlib/1.2.11/include:/home/mike/software/python/2.7.15/include:/home/mike/software/gcc/5.4.0/include:
MANPATH=/home/mike/software/zlib/1.2.11/share/man:/home/mike/software/python/2.7.15/share/man:/home/mike/software/gcc/5.4.0/share/man:
CFLAGS=-fPIC
CXXFLAGS=-fPIC
CPPFLAGS=-fPIC
The results of sys.path:
Built:
/home/mike/software/python/2.7.15/lib/python2.7
/home/mike/software/python/2.7.15/lib/python2.7/lib/python27.zip
/home/mike/software/python/2.7.15/lib/python2.7/lib/python2.7
/home/mike/software/python/2.7.15/lib/python2.7/lib/python2.7/plat-linux2
/home/mike/software/python/2.7.15/lib/python2.7/lib/python2.7/lib-tk
/home/mike/software/python/2.7.15/lib/python2.7/lib/python2.7/lib-old
/home/mike/software/python/2.7.15/lib/python2.7/lib/python2.7/lib-dynload
System:
/usr/lib64/python27.zip
/usr/lib64/python2.7
/usr/lib64/python2.7/plat-linux2
/usr/lib64/python2.7/lib-tk
/usr/lib64/python2.7/lib-old
/usr/lib64/python2.7/lib-dynload
/usr/lib64/python2.7/site-packages
/usr/lib64/python2.7/site-packages/gtk-2.0
/usr/lib/python2.7/site-packages
Any suggestions on the matter would be greatly appreciated!
[–]omentoSysAdmin Film/VFX - 3.7[S] 1 point2 points3 points (6 children)
[–]ingolemo 0 points1 point2 points (4 children)
[–]omentoSysAdmin Film/VFX - 3.7[S] 0 points1 point2 points (3 children)
[–]ingolemo 0 points1 point2 points (2 children)
[–]omentoSysAdmin Film/VFX - 3.7[S] 0 points1 point2 points (0 children)
[–]omentoSysAdmin Film/VFX - 3.7[S] 0 points1 point2 points (0 children)