0

I have some Python scripts that require different versions of Python, including but not limited to 2.4, 2.7, 3.2. I don't have the code ownership of the scripts, so the scripts can change by the next update. Therefore it's not an option to convert or adapter the scripts to a common Python version. Instead I want to manage environments with different versions of Python and different versions of the used modules. That's calling for Anaconda environments.

Running this command conda --name MyEnv python=2.4 in miniconda 2.7 failed with the message

Solving environment: failed

PackagesNotFoundError: The following packages are not available from current channels:

  • python=2.4

How can I install different Python versions on a set of Windows PCs and share environments to run the same scripts in the required environments?

AMC
  • 2,642
  • 7
  • 13
  • 35
harper
  • 13,345
  • 8
  • 56
  • 105
  • _How can I install different Python versions on a set of Windows PCs and share environments to run the same scripts in the required environments?_ Is that related to the previous issue? What is the "main question" here? – AMC Apr 27 '20 at 04:25
  • Previous issue? I just described what I did before posting a question. The actual question is, how do manage different Python version and how do I manage that this will work also on different PCs if I copy the scripts to the other(s) PC(s)? Canda is obviously not the answer or I did something wrong. – harper Apr 27 '20 at 10:41
  • Sorry if my comment wasn’t clear, by previous issue I am referring to the whole `PackagesNotFoundError` situation. _The actual question is, how do manage different Python version and how do I manage that this will work also on different PCs if I copy the scripts to the other(s) PC(s)?_ I’m confused, the accepted answer is mostly focused on the issue of Python 2.4. – AMC Apr 27 '20 at 10:51
  • _Canda is obviously not the answer or I did something wrong._ I’m confused even further now. I would not consider the availability of a package for Python 2.4 to be a significant aspect when comparing tools/methods for managing multiple Python installations/environments. – AMC Apr 27 '20 at 10:55

1 Answers1

0

Python 2.4 is very old and Anaconda does not support it.

It seems like PyEnv supports managing different versions of Python environments including 2.4 and other versions you need. Here's a tutorial that might be useful. (I haven't tried it.)

Another option is virtualenv, but you'll still need to use an older version of it because they stopped supporting Python 2.4. Here's a pointer.

lishrimp
  • 176
  • 1
  • 4