For my last project, I used poetry to manage dependencies and package my code. Poetry comes with all the tools you might need to manage your projects in a deterministic way.
Anyway, after running poetry init in an existing project, I tried to let poetry create a virtuale environment, by adding the first dependecy, but when I did poetry add twisted it suddenly hang out, printing:
No module named 'virtualenv.seed.via_app_data'
Why is that? Because poetry was using the wrong virtualenv instance, so to solve this:
- Remove all virtualenv istances
sudo apt remove --purge python3-virtualenv virtualenv
- Remove unused dependencies
sudo apt autoremove
- Install virtualenv
pip3 install virtualenv
- Add dependencies with poetry
poetry add <dependecy_name>
Now it should work.