

pipenvでpythonのバージョン指定がしたいのですが↓のようにFailed creating virtual
environmentになってしまいます。なぜでしょうか？

[code]

    [vagrant@localhost mypy]$ pipenv --python 3.7
    Virtualenv already exists!
    Removing existing virtualenv...
    Creating a virtualenv for this project...
    Pipfile: /home/vagrant/myreact/hw/src/python/Python-3.7.3/mypy/Pipfile
    Using /usr/local/bin/python3.7 (3.7.3) to create virtualenv...
    ⠼ Creating virtual environment...Running virtualenv with interpreter /usr/local/bin/python3.7
    
    ✘ Failed creating virtual environment
    [pipenv.exceptions.VirtualenvCreationException]:   File "/usr/lib/python2.7/site-packages/pipenv/cli/command.py", line 208, in cli
    [pipenv.exceptions.VirtualenvCreationException]:       clear=state.clear,
    [pipenv.exceptions.VirtualenvCreationException]:   File "/usr/lib/python2.7/site-packages/pipenv/core.py", line 574, in ensure_project
    [pipenv.exceptions.VirtualenvCreationException]:       pypi_mirror=pypi_mirror,
    [pipenv.exceptions.VirtualenvCreationException]:   File "/usr/lib/python2.7/site-packages/pipenv/core.py", line 536, in ensure_virtualenv
    [pipenv.exceptions.VirtualenvCreationException]:       pypi_mirror=pypi_mirror,
    [pipenv.exceptions.VirtualenvCreationException]:   File "/usr/lib/python2.7/site-packages/pipenv/core.py", line 506, in ensure_virtualenv
    [pipenv.exceptions.VirtualenvCreationException]:       python=python, site_packages=site_packages, pypi_mirror=pypi_mirror
    [pipenv.exceptions.VirtualenvCreationException]:   File "/usr/lib/python2.7/site-packages/pipenv/core.py", line 935, in do_create_virtualenv
    [pipenv.exceptions.VirtualenvCreationException]:       extra=[crayons.blue("{0}".format(c.err)),]
    [pipenv.exceptions.VirtualenvCreationException]: Traceback (most recent call last):
      File "/usr/lib/python2.7/site-packages/virtuale
    
    [vagrant@localhost mypy]$ python3.7 -V
    Python 3.7.3
    
    ['', '/usr/local/lib/python37.zip', '/usr/local/lib/python3.7', '/usr/local/lib/python3.7/lib-dynload', '/usr/local/lib/python3.7/site-packages']
    >>> exit()
    
[/code]

追記  
Pipfileのrequiresに3.7を指定したり、削除したりしましたが駄目でした。PATHは通っています。

[code]

    [vagrant@localhost mypy]$ which python3.7
    /usr/local/bin/python3.7
    [vagrant@localhost mypy]$ echo $PATH
    /usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/vagrant/.local/bin:/home/vagrant/bin
    [vagrant@localhost mypy]$
    
[/code]


CC BY-SA 4.0
2019-05-20T15:22:07.380
55120
2019-05-20T21:22:40.447
2019-05-20T21:22:40.447
19110
32180
question
python python3 pipenv
pipenv　pythonのバージョン指定ができない