user890207
user890207

Reputation: 519

How to setup python 3 from virtual environment as the default python for Django

I have a droplet from DigitalOcean. It runs Ubuntu 16.04. By default, it is using Python2.

I have a website created with Django. I want to setup a virtual env and run python 3 in the virtual environment. The HTTP server in the droplet is NGINX.

How can I let the droplet pick up the python 3 in the virtual environment as the python for my Django project?

Thank!

Upvotes: 0

Views: 267

Answers (1)

Mauricio Cortazar
Mauricio Cortazar

Reputation: 4213

s virtualenv -p python3 envname or virtualenv -p /usr/bin/python3 <venv-name> that's going to create a virtualenv with python3, tell me if I misunderstood the question

Upvotes: 1

Related Questions