How to import two versions of the same python module at the same time?

萝らか妹 提交于 2019-12-03 16:16:22

You have to import it from one level higher:

import version1.my_lib as a
import version2.my_lib as b

Also make sure that in all the folder there is a __init__.py.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!