I am building Python 3.10 from source on Ubuntu 18.04, following instructions from several web links, primarily the Python website (https://devguide.python.org/setup) and RealPython (https://realpython.com/installing-python/#how-to-build-python-from-source-code). I extracted Python-3.10.0.tgz into /opt/Python3.10
. I have three questions.
First, the Python website says to use ./configure --with-pydebug
and RealPython says to use ./configure --enable-optimizations --with-ensurepip=install
. Another source says to include --enable-shared
and --enable-unicode=ucs4
. Which of these is best? Should I use all of those flags?
Second, I currently have Python 3.6 and Python 3.8 installed. They are installed in several directories under /usr
. Following the directions I have seen on the web I am building in /opt/Python3.10. I assume that make altinstall
(the final build step) will take care of installing the build in the usual folders under /usr
, but that's not clear. Should I use ./configure --prefix=directory
although none of the web sources mention doing that?
Finally, how much does --enable-optimizations
slow down the install process?
This is my first time building Python from source, and it will help to clear these things up. Thanks for any help.