amazon web services – Problem creating Python 2 Conda environment on EC2

I’m trying to set up a virtual environment on Amazon Linux 2023 AMI, instance type t2.micro.

After successfully installing pip and miniconda I can create virtual environments with the latest Python version 3.9.16, but if I want an older version say Python 2.7.1 I get PackagesNotFoundError.

Image of my attempts and error messages

Is there a way to get older versions of Python? I need to run an older version of tensorflow in this virtual environment for my code.

I have tried pip install tensorflow that installs the latest version 2.15.0. And I have tried to download and install Python 2.7.1 but failed.

Read more here: Source link