#Another python version not working on another virtual environment

3 messages · Page 1 of 1 (latest)

rich venture
#

Hi, so I need another python version for a project (I am working in Jupyter). Right now I have a file with two virtual environments, "ven" and "ven2". So for ven , I want to have python 3.11 installed, and for ven2 I want to have python 3.10 installed. I can choose between different kernels at the upper right corner of VSCode. Since I installed ven2 with python 3.10, I can choose that to a working project-file, which I have done.

However, when I type python3 --version in my projekt file with the kernel ven2, I get python 3.11.

I need the 3.10 to import the torch library, and since this still does not work, I think it has to do with the terminal still saying it is python version 3.11 even if the kernel for that project-file is 3.10.

Any pointers on how to fix this?

Thanks in advance!

#

Okay, an update. I was wrong, I do have the right version, e.g., 3.10 in ven2. However, the problem is not resolved. The error says: "No module named 'torch'", and I have really tried to google this but now I do not know what might be wrong

surreal storm
#

You need to make sure that the correct environment is activated in your terminal when you run your script