On 7/10/17, Nigel Palmer <ni...@cresset-group.com> wrote: > Hi > > I am trying to compile Python 3.6.1 on macOS 10.12.5 with xcode 8.8.3 using > the instructions at > https://docs.python.org/devguide/setup.html#build-dependencies but I am > getting the error > > ./python.exe -E -S -m sysconfig --generate-posix-vars ;\ > if test $? -ne 0 ; then \ > echo "generate-posix-vars failed" ; \ > rm -f ./pybuilddir.txt ; \ > exit 1 ; \ > fi > /bin/sh: line 1: 96973 Killed: 9 ./python.exe -E -S -m > sysconfig --generate-posix-vars > generate-posix-vars failed > make: *** [pybuilddir.txt] Error 1 > > When I manually run that command using dbll I get: > > lldb ./python.exe -- -E -S -m sysconfig --generate-posix-vars > (lldb) target create "./python.exe" > Current executable set to './python.exe' (x86_64). > (lldb) settings set -- target.run-args "-E" "-S" "-m" "sysconfig" > "--generate-posix-vars" > (lldb) r > Process 96978 launched: './python.exe' (x86_64) > Could not find platform dependent libraries <exec_prefix> > Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] > Process 96978 exited with status = 0 (0x00000000) > (lldb) > > > The commands I ran to configure and build python are: > brew install openssl xz > CPPFLAGS="-I$(brew --prefix openssl)/include" LDFLAGS="-L$(brew --prefix > openssl)/lib" ./configure --prefix=`pwd`/../build > make > > Any ideas on what I am doing wrong? > > Many Thanks > Nigel > -- > https://mail.python.org/mailman/listinfo/python-list >
Something like this is working? python -c "from distutils.sysconfig import get_config_var as gv; px = 'prefix' ;epx = 'exec_prefix' ;LIBDEST = 'LIBDEST' ;LD = 'LIBDIR' ;print(f'LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:{gv(LD)} PYTHONPATH=\$PYTHONPATH:{gv(LIBDEST)} PYTHONHOME=\$PYTHONHOME:{gv(px)}:{gv(epx)} ')" or maybe python.exe in your case -> python.exe -c "from distutils.sysconfig import get_config_var as gv; px = 'prefix' ;epx = 'exec_prefix' ;LIBDEST = 'LIBDEST' ;LD = 'LIBDIR' ;print(f'LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:{gv(LD)} PYTHONPATH=\$PYTHONPATH:{gv(LIBDEST)} PYTHONHOME=\$PYTHONHOME:{gv(px)}:{gv(epx)} ')" -- https://mail.python.org/mailman/listinfo/python-list