I’m trying to install some package (in this particular example xformers, but this happens for other packages as well).
poetry run pip install xformers
results in ModuleNotFoundError: No module named 'torch'
. (The same will happen if I try poetry add
).
However I can see torch installed inside poetry environment via:
poetry run python
>> import torch
>>
I can see that torch is imported in setup.py of xformers, but I don’t understand why would that not use the one inside petry environment.
Torch is also installed in the environment that poetry is run in. So what kind of virtual environment is poetry using here that doesn’t see torch?