pipenv:如何强制virtualenv目录? [英] pipenv : how to force virtualenv directory?

查看:237
本文介绍了pipenv:如何强制virtualenv目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实际上,pipenv将使用以下路径安装virtualenv:

Actually, pipenv will install the virtualenv with a path like this :

$WORKON_HOME/<base_dir>-<hash>

例如,是否可能确切地具有我想要的路径,即没有base_dirhash:

Is it possible to have exactly the path I want, that is without the base_dir and the hash, for exemple :

/home/user/myapp_venv

推荐答案

有一个未记录的功能,它可以从VIRTUAL_ENV环境变量中找到virtualenv路径,但是您需要手动创建virtualenv:

There is an undocumented feature of pipenv, it could locate virtualenv path from VIRTUAL_ENV environment variable, but you need to create virtualenv manually:

virtualenv /home/user/myapp_venv
VIRTUAL_ENV=/home/user/myapp_venv pipenv install

这篇关于pipenv:如何强制virtualenv目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆