Legen Sie die python-version, die beim erstellen virtualenv verwenden pipenv

Mithilfe eines Raspberry Pi mit Debian 4.14.34-v7+, ich werde versuchen, pipenv mit Python 3.6.5 als die Standard-version von Python. Ich zuerst installieren Sie Python 3.6 durch kompilieren auf dem Pi (Stunden...). Nach einer "Roboter" - Verzeichnis habe ich dann installieren pipenv mit "$ sudo pip3 installieren pipenv" und "$pipenv installieren-drei".

Dann habe ich die shell starten und öffnen, Python, erste 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()

Ich dann ändern Sie die virtualenv von "$ pipenv --python 3.6" aber nachdem es richtig (scheinbar) installiert, bekomme ich sofort die Warnung, dass pipenv noch erwartet 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.
>>> 

SO die Frage - Wie richte ich pipenv zu suchen Python-3.6, wenn ich zuerst die virtualenv? Ich kann manuell gehen und Bearbeiten Sie die Pipfile, aber das scheint sein Sieg über den Zweck des habens pipenv kümmern sich um Dinge für mich.

InformationsquelleAutor James Taylor | 2018-05-03
Schreibe einen Kommentar