-1

I am trying to create a virtual enviroment in my ubuntu OS using virtualenv

The command I am using is

virtualenv -p /usr/bin/python3.8.13 py3.8.13_env

The error shown is

FileNotFoundError:[Errno 2]No such file or directory:'/usr/bin/python3.8.13'

I have tried several other python versions but I get the same error

B Ahern
  • 11
  • 4

1 Answers1

1

You can see what versions of Python you have by:

ls -l /usr/bin/python*

If you don't provide one then virtualenv will use a default of /usr/bin/python3. On Ubuntu this will be a symlink to a specific version. e.g.

/usr/bin/python3 -> python3.10

So just calling virtualenv like:

virtualenv py3.10_venv

Would create a virtualenv called "py3.10_venv" (a folder) in your current working directory, using Python 3.10 in this example.

If you have other versions (shown by the ls command above) then you can use those specifically as you are trying to do in your question above.

bigkeefer
  • 576
  • 1
  • 6
  • 13