Jeu de version de python lors de la création de virtualenv à l'aide de pipenv

À l'aide d'un Raspberry Pi à l'aide de Debian 4.14.34-v7+, je suis en train d'essayer d'obtenir pipenv mis en place avec Python 3.6.5 que la version par défaut de Python. J'ai d'abord installer Python 3.6 par le compiler sur le Pi (heures...). Après avoir fait un 'robot' répertoire, j'ai ensuite installer pipenv avec "$ sudo pip3 installer pipenv" et "$pipenv install --trois".

Puis-je commencer la coquille et ouvrir Python, obtenir Python 3.5.3:

pi@raspberrypi:~/robot $ pipenv shell
Spawning environment shell (/bin/bash). Use 'exit' to leave.
. /home/pi/.local/share/virtualenvs/robot-XZ3Md9g0/bin/activate
pi@raspberrypi:~/robot $ . /home/pi/.local/share/virtualenvs/robot-XZ3Md9g0/bin/activate
(robot-XZ3Md9g0) pi@raspberrypi:~/robot $ python
Python 3.5.3 (default, Jan 19 2017, 14:11:04) 
[GCC 6.3.0 20170124] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()

J'ai ensuite modifier le virtualenv par "$ pipenv --python 3.6" mais après avoir correctement (apparemment) installe, j'ai immédiatement l'avertissement que pipenv encore que Python 3.5...:

(robot-XZ3Md9g0) pi@raspberrypi:~/robot $ pipenv --python 3.6
Virtualenv already exists!
Remove existing virtualenv? [Y/n]: y
Removing existing virtualenv
Creating a virtualenv for this project
Using /usr/local/bin/python3.6m (3.6.5) to create virtualenv
Running virtualenv with interpreter /usr/local/bin/python3.6m
Using base prefix '/usr/local'
New python executable in /home/pi/.local/share/virtualenvs/robot-XZ3Md9g0/bin/python3.6m
Also creating executable in /home/pi/.local/share/virtualenvs/robot-XZ3Md9g0/bin/python
Installing setuptools, pip, wheel...done.

Virtualenv location: /home/pi/.local/share/virtualenvs/robot-XZ3Md9g0
Warning: Your Pipfile requires python_version 3.5, but you are using 3.6.5 (/home/pi/.local/share/v/r/bin/python).
  $ pipenv check will surely fail.
(robot-XZ3Md9g0) pi@raspberrypi:~/robot $ python
Python 3.6.5 (default, May  3 2018, 11:25:17) 
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

- La question - Comment puis-je configurer pipenv chercher Python 3.6 quand j'ai d'abord créer le virtualenv? Je peux aller manuellement et modifier le Pipfile, mais qui semble être défaisant le but d'avoir pipenv prendre soin des choses pour moi.

InformationsquelleAutor James Taylor | 2018-05-03