close

How to setup a pipenv Python 3.6 project if OS Python version is 3.5?

Hello Guys, How are you all? Hope You all Are Fine. Today We Are Going To learn about How to setup a pipenv Python 3.6 project if OS Python version is 3.5 in Python. So Here I am Explain to you all the possible Methods here.

Without wasting your time, Let’s start This Article.

Table of Contents

How to setup a pipenv Python 3.6 project if OS Python version is 3.5?

  1. How to setup a pipenv Python 3.6 project if OS Python version is 3.5?

    Or install it on your system. But I guess you will need the version to be installed if you plan to actually run pipenv install.

  2. setup a pipenv Python 3.6 project if OS Python version is 3.5

    Or install it on your system. But I guess you will need the version to be installed if you plan to actually run pipenv install.

Method 1

Either manually write the version you need in your Pipfile:

[requires]
python_version = "3.6"

Or install it on your system. But I guess you will need the version to be installed if you plan to actually run pipenv install.

Follow the installation instructions, then installing Python 3.6 is just a matter of

pyenv install 3.6.3

Then you can set the order of preference with

pyenv global system 3.6.3

Besides, if pyenv is available, pipenv will automatically use it to install the required version. From pipenv README:

Automatically install required Pythons, if pyenv is available.

Method 2

On MacOS, I have also used pyenv to manage python versions, similar to @pawamoy’s suggestion.

After installation I executed pipenv shell with the --python option pointing to the directory of the specific pyenv version. This will automatically generate a Pipfile with python_version = "3.6".

⇒  pipenv --python /Users/<Your User>/.pyenv/versions/3.6.3/bin/python3.6 shell

Summery

It’s all About this issue. Hope all Methods helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which Method worked for you? Thank You.

Also, Read