12/3/2023 0 Comments Aws ec2 sudo pip command not foundAs you continue to work with Python, consider exploring its extensive ecosystem of libraries and frameworks, which can further enhance your programming capabilities and project efficiency. This approach allows for a more personalized installation experience, enabling you to take full advantage of Python 3.9’s improved performance and new features. Throughout this tutorial, we have shown you the detailed steps to install Python 3.9 on Amazon Linux 2 using the source archive file. Once your work is finished, use the following command to deactivate the Python environment. source env/bin/activateĪfter activating the environment, you can work with your application. The above command will create a directory “env” in the current directory containing all the required files for the isolated environment.Įvery time you need to make changes in the environment, Use the below command to activate it. Use the following command to create an environment directory: python3.9 -m venv env This will contain application-specific packages. Where you can create an environment directory with a specific Python version. Python provides to create an isolated environment for the applications. Step 4 – Create Python Virtual Environment As we have not overwritten the current Python version, you need to run Python 3.9 command as follows: python3.9 -V The Python 3.9 binary is installed under /usr/local/bin directory. Now remove the downloaded source archive file from your system sudo rm -f /opt/Python-3.9.16.tgz Step 3 – Check Python Version Make altinstall is used to prevent replacing the default python binary file /usr/bin/python. configure -enable-optimizations sudo make altinstall Below set of commands to compile Python 3.9 from the source code and install using the altinstall command. After that, you can compile and install it with the make command. configure script to prepare the source code. Switch to the extracted directory with the cd command. sudo tar xzf Python-3.9.16.tgz Step 2 – Install Python 3.9 cd /opt wget Īfter the download is finished, extract the archive file. Alternatively, You can use the following command to download Python 3.9 on a local machine. Visit Python’s official download page and download the required Python on your system. Read: How to Use SSH to Connect Remote Linux Server.Open a terminal on your system and install the prerequisites for Python: sudo yum install gcc openssl-devel bzip2-devel libffi-devel So must have installed the required development libraries first. Installing Python from the source code requires a GCC compiler. This method of installation provides you with greater flexibility and customization options, ensuring that your system is equipped with the most up-to-date version of Python. In this tutorial, we will walk you through the process of installing Python 3.9 on Amazon Linux 2 systems using the source archive file. ![]() The release of Python 3.9 brings several performance enhancements and new features, making it an attractive choice for developers. Python is a highly popular and versatile programming language, renowned for its simplicity, ease of learning, and wide range of applications, including web development, data analysis, and machine learning.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |