Answorth
Answorth

Reputation: 147

How to install correct python version in my virtual env using pipenv

I'm trying to use pipenv as my primary tool for managing dependencies for a django app I'm trying to get deployed, and hitting a snag at the python version specified in the Pipfile.

The server is an ubuntu 18.04 machine where I have manually installed pip3 and pipenv. System python3 is 3.6.7, but I developed with 3.7.2 and that's what is specified in project's Pipfile. I want to use pipenv to create my virtual environment and install all dependencies in one go, including the correct python version, but I'm getting blocked when I run pipenv deploy:

$ pipenv install --deploy
Warning: Python 3.7 was not found on your system…
You can specify specific versions of Python with:
  $ pipenv --python path/to/python

Seems like a chicken vs egg issue but I'm assuming there's a best practice about deploying apps using pipenv on fresh servers that I'm missing. Will I just need to install the correct version and pass it to pipenv as an argument manually?

Upvotes: 0

Views: 4912

Answers (1)

LiuChang
LiuChang

Reputation: 774

I think you just need to install the correct version. You can refer to pipenv document.

As it said, "Pipenv will automatically scan your system for a Python that matches that given version"

Upvotes: 0

Related Questions