This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author raphael.kl
Recipients Joshua Merchant, munocat, ned.deily, pda, pmpp, raphael.kl, rnash, rosslagerwall, zhao.wang.unsw
Date 2020-11-21.22:11:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1605996672.54.0.580467050465.issue14527@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2020-11-21 22:11:12raphael.klsetrecipients: + raphael.kl, ned.deily, pmpp, rosslagerwall, pda, rnash, Joshua Merchant, munocat, zhao.wang.unsw
2020-11-21 22:11:12raphael.klsetmessageid: <1605996672.54.0.580467050465.issue14527@roundup.psfhosted.org>
2020-11-21 22:11:12raphael.kllinkissue14527 messages
2020-11-21 22:11:12raphael.klcreate