Message381577
To install Python 3.9 locally, with ctypes, this worked for me.
# I created a temp directory
cd ~
mkdir tmp
cd tmp
# I downloaded and installed the latest libffi source from Github
wget "https://github.com/libffi/libffi/releases/download/v3.3/libffi-3.3.tar.gz"
tar xvf libffi-3.3.tar.gz
cd libffi-3.3
./configure --prefix=$HOME && make && make install
# I now had some libffi files in ~/lib/pkgconfig and ~/lib64.
# I added these to LD_LIBRARY_PATH, along with ~/lib.
export LD_LIBRARY_PATH="$HOME/lib/pkgconfig:$HOME/lib:$HOME/lib64:$LD_LIBRARY_PATH"
# I downloaded and installed the latest Python from python.org
cd ~/tmp
wget "https://www.python.org/ftp/python/3.9.0/Python-3.9.0.tgz"
cd ~/tmp/Python-3.9.0
./configure --prefix=$HOME --with-system-ffi LDFLAGS="-L $HOME/lib64/" CPPFLAGS="-I $HOME/tmp/libffi-3.3/include/"
make
make test
make install
# I was then able to run an installer that had shown me the error, "No module named '_ctypes'
pip3 install mycli
I hope this can be useful to you.
Raffi |
|
Date |
User |
Action |
Args |
2020-11-21 22:11:12 | raphael.kl | set | recipients:
+ raphael.kl, ned.deily, pmpp, rosslagerwall, pda, rnash, Joshua Merchant, munocat, zhao.wang.unsw |
2020-11-21 22:11:12 | raphael.kl | set | messageid: <1605996672.54.0.580467050465.issue14527@roundup.psfhosted.org> |
2020-11-21 22:11:12 | raphael.kl | link | issue14527 messages |
2020-11-21 22:11:12 | raphael.kl | create | |
|