Set python version when creating virtualenv using pipenv

后端 未结 4 1886
故里飘歌
故里飘歌 2020-12-25 13:10

Using a Raspberry Pi using Debian 4.14.34-v7+, I am trying to get pipenv set up with Python 3.6.5 as the default version of Python. I first install Python 3.6 b

4条回答
  •  半阙折子戏
    2020-12-25 13:32

    When setting up your pipenv you can specify the version of Python by using: pipenv --python 3.6, to use Python3.6.

    Editing the Pipfile also works, by changing:

    [requires] python_version = "3.6.6"

    to the specific version of Python you want.

    If you did all of this and are still having trouble with accessing the correct version of Python from within pipenv shell then you might want to check your .bashrc file to be sure that you don't have an alias for a specific version of Python.

提交回复
热议问题