J'ai 2 versions pyenv installéesComment créer un virtualenv en utilisant python installé par pyenv
pyenv versions
system
* 2.7 (set by ../.python-version)
3.5.3
quand je crée un virtualenv
dans mon répertoire de projet, je le veux créer un virtualenv
pour le pyenv
courant python Version 2.7
mais quand je crée un à l'aide mkvirtualenv whatever
env virtuel crée une python3 virtualenv
ll ~/.virtualenvs/mobile2/bin
total 5800
-rw-r--r-- 1 ohadperry staff 2.0K Sep 6 10:59 activate
-rw-r--r-- 1 ohadperry staff 1.0K Sep 6 10:59 activate.csh
-rw-r--r-- 1 ohadperry staff 2.1K Sep 6 10:59 activate.fish
-rw-r--r-- 1 ohadperry staff 1.1K Sep 6 10:59 activate_this.py
-rwxr-xr-x 1 ohadperry staff 266B Sep 6 10:59 easy_install
-rwxr-xr-x 1 ohadperry staff 266B Sep 6 10:59 easy_install-3.5
-rwxr-xr-x 1 ohadperry staff 149B Sep 6 10:59 get_env_details
-rwxr-xr-x 1 ohadperry staff 238B Sep 6 10:59 pip
-rwxr-xr-x 1 ohadperry staff 238B Sep 6 10:59 pip3
-rwxr-xr-x 1 ohadperry staff 238B Sep 6 10:59 pip3.5
-rw-r--r-- 1 ohadperry staff 71B Sep 6 10:59 postactivate
-rw-r--r-- 1 ohadperry staff 73B Sep 6 10:59 postdeactivate
-rwxr-xr-x 1 ohadperry staff 68B Sep 6 10:59 preactivate
-rw-r--r-- 1 ohadperry staff 74B Sep 6 10:59 predeactivate
-rwxr-xr-x 1 ohadperry staff 2.8M Sep 6 10:58 python
-rwxr-xr-x 1 ohadperry staff 2.3K Sep 6 10:59 python-config
lrwxr-xr-x 1 ohadperry staff 6B Sep 6 10:58 python3 -> python
lrwxr-xr-x 1 ohadperry staff 6B Sep 6 10:58 python3.5 -> python
-rwxr-xr-x 1 ohadperry staff 245B Sep 6 10:59 wheel
Conseiller cet ans, possible en double https://stackoverflow.com/questions/1534210/use-different-python-version-with-virtualenv – Sanket
vous avez raison. suggérer de fermer cette question –
Non, ne le fermez pas. Cette question concerne l'utilisation de virtualenv dans pyenv - le titre devrait être mis à jour pour refléter cela. – danodonovan