May-05-2022, 04:41 AM
My OS environment is
I cloned the latest Python code from git.
Add below into profile for environment setting.
Please advise. Thanks.
openSUSE Tumbleweed.I cloned the latest Python code from git.
git clone -b main --single-branch [email protected]:python/cpython.gitI compiled the code locally, and successfully done after solved all modules error.
./configure --prefix=/opt/python3 --enable-optimizations --with-ensurepip=install make sudo make installAnd also linked pip and pip3 to new target compiled
/opt/python3/bin/pip3. alts -l pip alts -l pip3And also linked
/usr/bin/python3 to new target /opt/python3/bin/python3. Add below into profile for environment setting.
## Python export PYTHONHOME=/opt/python3 export PYTHONPATH=/opt/python3/lib:/opt/python3/lib64:/opt/python3/lib/python3.11:/opt/python3/lib/python3.11/site-packages ## Update PATH export PATH=$PYTHONHOME:$PYTHONPATH:$PATHAfter above preparation, I got error
ModuleNotFoundError: No module named '_struct' when I tried to launch pip, and got error ModuleNotFoundError: No module named 'readline' when I tried to launch python.Please advise. Thanks.
