如何在 Python 中使多个库位于同一父路径下

问题描述 投票:0回答:0

假设我有

library1

.
└── mycompany/
    ├── __init__.py
    └── library1/
        ├── __init__.py
        ├── file1.py
        └── file2.py

library2

.
└── mycompany/
    ├── __init__.py
    └── library2/
        ├── __init__.py
        ├── code1.py
        └── code2.py

他们都有

mycompany
的父目录和自己的
__init__.py
文件在里面。

这行得通吗?如何安装这些库?

__init__
文件不会冲突吗?

python python-packaging
© www.soinside.com 2019 - 2024. All rights reserved.