Closed nzjrs closed 4 months ago
On one hand, this sounds plausible. On the other hand:
__init__.py
play no role since Python 3 anymore. Are you trying to install this on a Python 2 system?pip install .
pip install -e .
pip install matplotlib-venn
.I'm fine with adding an extra __init__.py
if it does help, but it would be nice to better understand the root problem here. Could you clarify how exactly you arrive at the error message?
On one hand, this sounds plausible. On the other hand:
- I believe
__init__.py
play no role since Python 3 anymore. Are you trying to install this on a Python 2 system?I can't reproduce the problem. Things I tried so far:
- (In an empty venv from within checked out repository)
pip install .
- (In an empty venv from within checked out repository)
pip install -e .
- (In an empty venv)
pip install matplotlib-venn
.I'm fine with adding an extra
__init__.py
if it does help, but it would be nice to better understand the root problem here. Could you clarify how exactly you arrive at the error message?
I installed the package from within jetbrains datalore https://datalore.jetbrains.com/notebooks (Python 3.8). I'd love to help you further debug this, but adding the __init__.py
is better best practice, and it fixed the problem here.
(could be setuptools version tbh, it didnt print the subpackge in find_packages()
unless I added the init.py)
Sorry it took some time to get back to it. I wanted to understand precisely what is the problem and one thing that was for sure not correct was that I used find_packages
while find_namespace_packages
is the right way to go to make sure setuptools
accounts for directories that do not have __init__.py
in them.
This, however, still was not enough to make python setup.py install
work correctly (pip installation works as intended) so I ended up adding those __init__.py
files anyway.
In general it feels that setup.py install
is broken for more than matplotlib_venn
nowadays - e.g. it also fails to install many of the key dependencies, such as scipy
and matplotlib
- those only work when installed with pip
.
Anyway, this particular issue should be hopefully resolved now.
Thanks. In my 20 years of working with Python I have learned that it is a fools errand to try to understand Python packaging, letalone the new flavour of the year tools. It is always broken and will always be so.
layout subpackage is empty because https://github.com/konstantint/matplotlib-venn/blob/master/setup.py#L50 does not find an
__init__.py
here https://github.com/konstantint/matplotlib-venn/tree/master/matplotlib_venn/layout