I have found an issue when using a mixed environment, where I installed bob with conda and some other bob packages with pip. While this works fine during installation and usage, uninstalling the packages with pip makes the environment unusable. Here is a path to recreate this issue:
1. install bob with conda:
2. activate conda environment
$ conda activate bob_test
3. install bob.db.lfw via pip
(bob_test) $ pip install bob.db.lfw
4. test the installation:
(bob_test) $ python
>>> import bob.db.lfw, bob.io.image
5. uninstall bob.db.lfw with pip
(bob_test) $ pip uninstall bob.db.lfw
6. cannot use bob anymore
(bob_test) $ python
>>> import bob.io.image
No module named io.image
7. cannot install any bob package anymore
(bob_test) $ pip install bob.db.lfw
Downloading bob.db.lfw
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-19sMQi/bob.db.lfw/setup.py", line 8, in <module>
from bob.extension.utils import load_requirements, find_packages
ImportError: No module named extension.utils
The reason is that the uninstallation also uninstalled the __init__.py files that declare the bob namespace. After copying back those files into conda/envs/bob_test/site_packages/bob (and .../bob/db in this case) the installation will be working again.
Since there is most probably nothing that we can do about this, I am not opening an issue somewhere. I think this is rather an issue of pip. I am mainly positing this solution in case someone has the same issue.
Cheers
Manuel