![]() ![]() Having multiple versions of Python available is usually not a big problem as long as you remember to type the full name including the version number (for example "python2.7" or "pip2.7"). It was first introduced in Fedora 18 in a testable state (i.e., tech preview), but it's been Fedora's default package manager since Fedora 22. This can be accomplished by using a custom prefix (for example /usr/local) when running configure, and using make altinstall (instead of the normal make install) when installing your build of Python. Dandified yum, better known as DNF, is a software package manager for RPM-based Linux distributions that installs, updates, and removes packages. ![]() Installing other versions works fine as long as you leave the original system version alone. ![]() You are not supposed to change the system version of Python because it will break the system (as you found out). # With pip installed you can now do things like this: # Then execute it using Python 2.7 and/or Python 3.6: Strip /usr/local/lib/libpython3.6m.so.1.0 configure -prefix=/usr/local -enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib" configure -prefix=/usr/local -enable-unicode=ucs4 -enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib" The next steps depend on the version of Python you're installing. # If you are on a clean "minimal" install of CentOS you also need the wget tool: Yum install -y zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel expat-devel # Libraries needed during compilation to enable all features of Python: It currently covers Python 2.7.13 and Python 3.6.0: # Start by making sure your system is up-to-date: I have written a quick guide on how to install the latest versions of Python 2 and Python 3 on CentOS 6 and CentOS 7.
0 Comments
Leave a Reply. |