pythonpipenv的环境运行
pythonpipenv的环境运行
1、说明
直接运行pipenvshell并不会出现shell命令行,是因为没有配置环境变量。还需要进一步研究,貌似需要配置环境变了,一直没找到。
pipenv提供了.env文件,放在项目目录下,提供项目所需的环境变量,运行pipenvshell时,会自动加载。
2、实例
可使用以下命令来运行项目:
pipenvrunpythonxxx.py
或者启动虚拟环境的shell环境:
~/laboratory/pip_test_project
$pipenvshell--anyway
Spawningenvironmentshell(/bin/zsh).Use'exit'toleave.
source/Users/pylixm/.local/share/virtualenvs/pip_test_project-MXA0TC90/bin/activate
~/laboratory/pip_test_project
$source/Users/pylixm/.local/share/virtualenvs/pip_test_project-MXA0TC90/bin/activate
(pip_test_project-MXA0TC90)
~/laboratory/pip_test_project
$exit
~/laboratory/pip_test_project
$pipenvshell
ShellforUNKNOWN_VIRTUAL_ENVIRONMENTalreadyactivated.
Noactiontakentoavoidnestedenvironments.
以上就是pythonpipenv环境运行的方法,希望对大家有所帮助。更多Python学习教程请关注IT培训机构:千锋教育。

猜你喜欢LIKE
相关推荐HOT
更多>>
如何使用python中的add函数?
如何使用python中的add函数?本文教程操作环境:windows7系统、Python3.9.1,DELLG3电脑。add函数使用方法1、numpy中加法运算使用实例importnump...详情>>
2023-11-14 14:11:16
python如何将九九乘法表写入到Excel?
python如何将九九乘法表写入到Excel?现在使用python去输出九九乘法表,已经不再稀奇,我们经常输出的环境是文本,但是今天教大家更为复杂一点的...详情>>
2023-11-14 12:11:28
python中altair可视化库怎么用?
python中altair可视化库怎么用?作为六大python可视化库,基本上学会都是可以通吃任何领域的存在,本章要给大家介绍的Altair就是其中之一的可视...详情>>
2023-11-14 09:40:29
python中最小二乘法如何理解?
python中最小二乘法如何理解?python中在实现一元线性回归时会使用最小二乘法,那你知道最小二乘法是什么吗。其实最小二乘法为分类回归算法的基...详情>>
2023-11-14 06:58:12热门推荐
如何使用python中的add函数?
沸python中dir函数如何使用?
热python中merge函数如何使用?
热python中str内置函数总结归纳
新python如何将九九乘法表写入到Excel?
Python的scikit-image模块是什么?
python timedelta函数是什么?
python中如何使用np.concatenate()拼接numpy数组
Python jieba库分词模式怎么用?
python中altair可视化库怎么用?
TCP在python中如何连接服务器?
python中使用__slots__定义类属性
python中的unittest框架是什么?
python字典获取对应键的方法
技术干货






