栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

Q1:stack overflow

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Q1:stack overflow

Now I have a project and I think it can be divided into three different modules like below.

project
│   README.md
│ 
└───flask_web
│   └───app_folder
│	|	└───  ...
|	|	└───  ...
|	|	|	__init__.py
|	|
│   │   app_run.py
│   └───venv
│       └──bin        
|	
│      
└───Fate
|	└─── ...
|	└───env
|		└───python36
|			└───venv
|				└───bin
|
└───fake_data_algorithm
	└─── ...
	└───venv
		└───bin

The first part ‘web’ is a flask application providing web service, it requires a virtual environment.

The second part ‘fate’ is a open source project for federal learning and also needs a virtual environment.If I want to start the system for federal learning process, I have to source ‘fate/bin/init_env.sh’ to activate the providing environment.

The third part ‘fake_data_algorithm’ is used to generate fake data based on the ‘data’ folder, which also requires virtual env for some python packages.

Because the after the ‘web’ application getting the request from browser, it will call
‘fate’ or ‘fake_data_algorithm’, but both of them are in a different virtual environment, so I should source the environment again.

so my puzzle is: Is there a mechanism that can enable the whole project keep running without switching the virtual environment.And because the “fate” is a relatively close part, I want to keep the virtual environment of ‘fate’ as far as possible(try to avoid put all the python packages in a single environment).

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/869856.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号