AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Install python on redhat4/21/2023 (NOTE: If you need to recompile / reinstall any pip package -like pycurl after replacing the PYCURL_SSL_LIBRARY variable-, first remove /root/. Once you've installed the desired modules, you can create folders for each project inside your virtualenv environment (or create new virtualenvs for each project using the examples above) and enjoy Python 3.x. Inside this virtualenv, you must install the desired third party modules with pip: Now, each time you do "source bin/activate" inside the virtualenv directory, you'll start your virtualenv with Python 3.4. # /usr/local/bin/virtualenv /path/to/your/virtenv3.4 # /usr/local/bin/pip3.4 install virtualenv Install required dependencies Specify Python version Download and extract Python Build and install Python Install pip Verify Python installation (. ![]() # /usr/local/bin/pip3.4 install -upgrade distributeĬreate your isolated Python 3.4 environment (replace /path/to/your/virtenv3.4 with the desired path for Python3 development, such as /home/youruser/prog/python3.4env/): # /usr/local/bin/pip3.4 install -upgrade setuptools Download Python Download the latest version for Windows Download Python 3.11. ![]() Now download and install Setuptools pip: configure -prefix=/usr/local -enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib" tar.xz file and replacing -3.4 in the commands below by the proper version number): ![]() Sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-develĭownload Python 3.4 sources and compile / install them (note that any other version can be installed by downloading a different. # yum install zlib-devel bzip2-devel openssl-devel ncurses-devel zx-devel \ This minitutorial is based on a stackoverflow tutorial that provided the steps for v3.2.Īs we're going to compile python3, we need to install the required development packages: ![]() But you can setup Python 3.x ( 3.4.3 in our example below) in a separate "virtualenv" environment, not affecting the system packages and allowing you to develop Python 3.x programs. CentOS and RedHat 6.x ship with Python 2, so you cannot/shouldn't install Python 3 at the system level (with or without the package manager).
0 Comments
Read More
Leave a Reply. |