-2

I am very new to Python. I am trying to install a library called Mesa (https://mesa.readthedocs.io/en/master/index.html) in a virtual environment, but each time I try to clone the repository I get the error message: An error occurred while installing pandas==1.2.4

I believe the problem is that I have installed Python 3.9, but Mesa works with Python 3.7. I have installed Python 3.7 on my computer also, but do not know how to make a virtual environment which runs Python 3.7.

I have virtualenv installed but this is as far as I have gotten... very specific answers would be much appreciated as I still don't really know what I am doing!

4
  • try pipenv pipenv.pypa.io/en/latest, then you can do pipenv --python 3.6 Commented Jul 9, 2021 at 14:50
  • Normally the python commands maps to the latest Python version installed in your system, but you can still explicitly access older Python versions if you add the version number, e.g. python3.7 -m pip install ... or python3.7 -m virtualenv .... Commented Jul 9, 2021 at 14:53
  • github.com/pyenv/pyenv should solve the issue. "pyenv lets you easily switch between multiple versions of Python. It's simple, unobtrusive, and follows the UNIX tradition of single-purpose tools that do one thing well." Commented Jul 9, 2021 at 14:53
  • stackoverflow.com/… Commented Jul 9, 2021 at 16:30

2 Answers 2

2

From my experience the easiest way is using Anaconda and creating environments with specific versions inside it. https://www.anaconda.com/

The second way I use is google colab its really fast if I just want to check something on different version and requires no setup just lunch it from your google account

Sign up to request clarification or add additional context in comments.

Comments

0
With python3.8:- virtualenv -p python3.8 env_name
replace python version like python3.9, python3.7..

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.