首页 > 编程语言 > 详细

[pipenv]Warning: Python 3.7 was not found on your system…

时间:2019-11-17 11:39:00      阅读:520      评论:0      收藏:0      [点我收藏+]

前置条件:

切换到pipfile文件所在目录gotest_official

问题描述:

使用pipenv install创建虚拟环境,报错

wangju@wangju-HP-348-G4:~/Desktop/gotest_official$ pipenv install 
Warning: Python 3.7 was not found on your system…
You can specify specific versions of Python with:
  $ pipenv --python path/to/python

问题分析:

pipfile中记录的python版本与开发机器中存在的python版本不一致导致

解决过程:

  • 通过命令whereis python3查看开发机器中python3启动目录
whereis python3
  • 使用pipenv --python path/to/python指定pipenv根据开发机python3版本创建虚拟环境
wangju@wangju-HP-348-G4:~/Desktop/gotest_official$ pipenv --python /usr/bin/python3.6
Creating a virtualenv for this project…
Pipfile: /home/wangju/Desktop/gotest_official/Pipfile
Using /usr/bin/python3.6 (3.6.8) to create virtualenv…
? Creating virtual environment...Already using interpreter /usr/bin/python3.6
Using base prefix /usr
New python executable in /home/wangju/.virtualenvs/gotest_official-ZTIMAEbX/bin/python3.6
Also creating executable in /home/wangju/.virtualenvs/gotest_official-ZTIMAEbX/bin/python
Installing setuptools, pip, wheel...
done.
Running virtualenv with interpreter /usr/bin/python3.6

? Successfully created virtual environment! 
Virtualenv location: /home/wangju/.virtualenvs/gotest_official-ZTIMAEbX
Warning: Your Pipfile requires python_version 3.7, but you are using 3.6.8 (/home/wangju/./g/bin/python).
  $ pipenv --rm and rebuilding the virtual environment may resolve the issue.
  $ pipenv check will surely fail.

使用lsvirtualenv查看开发机虚拟环境列表,可以看到,gotest_official项目的虚拟环境已经创建成功了

技术分享图片

 

 

 

 

[pipenv]Warning: Python 3.7 was not found on your system…

原文:https://www.cnblogs.com/kaerxifa/p/11875710.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!