Allen Ma
Allen Ma

Reputation: 93

How to change interpreter using venv?

I have a project that exists in ~/Allen/project1 and used venv to create an isolated environment: python3 -m venv ~/Allen/project1.

The project I am doing requires Python 3.6, but my current Python3 is python3 --version: Python 3.5.1 and my default OS X python is 2.7.10, neither of which is the correct python version.

How do I get configure a Python 3.6 interpreter inside my virtual environment.

Note that I'm using the newer venv instead of virtualenv although I don't think that should make too much of a difference.

Upvotes: 0

Views: 1022

Answers (1)

Jimmy
Jimmy

Reputation: 91472

You need to run venv with the appropriate python version, so install Python3.6 and run python3.6 -m venv

Upvotes: 1

Related Questions