Forums

Virtualenv problem

Hello, I keep getting this error message but I have doublechecked my python version and virtualenv version:

This virtualenv seems to have the wrong Python version (3.6 instead of 3.8).

Here's from my bash:

(myvirtualenv) 00:22 ~ $ python --version

Python 3.8.0

Thanks!

Hi, I think I've already answered you in a different topic. It looks like you somehowe managed to have two Python versions inside that venv (probably by manually copying some files?), which makes is practically unusable. Delete this venv, and create new one with python=python3.6 option (if you're using mkvirtualenv command) and everything should be OK.

tried that, still getting the same error message. I tried deleting all the virtual env files. Any ideas? Thanks

Apologies. It looks like pafk left out an important thing in his response - the argument to pass to create a virtualenv for Python 3.8 (so that it matches your web app) is --python=python3.8

Hmm, now im getting this:

This virtualenv seems to have the wrong Python version (2.7 instead of 3.8).

Did you run mkvirtualenv in the bash console with the --python=python3.8 flag?

i ran

mkvirtualenv --python=python3.8

You need to include venv name in the command.

See https://help.pythonanywhere.com/pages/Virtualenvs/

I am getting this message in my 'Web': This virtualenv seems to have the wrong Python version (3.8 instead of 3.9). But at my Bash console, when I enter 'python --version', I get the correct python version that I am using: Python 3.9.5. How do I resolve this error?

I see that you sent us an email about this too, so let's continue the discussion there.