DEV Community

Discussion on: Why you should always use virtualenv when working in Python

Collapse
stevepryde profile image
Steve Pryde

This will become less necessary once PEP-582 lands. They are proposing a local packages directory per project more like node_modules etc.

python.org/dev/peps/pep-0582/

Also I would highly recommend a dependency manager like poetry instead of using pip directly. It will take care of everything from creating a virtualenv and managing all of your dependencies and their versions. It is much more like npm in this regard, with a lock file that can give you reproducible builds.

Collapse
asjadanis profile image
Asjad Anis Author

This sounds really nice, I didn’t know about poetry I have seen pipenv in action I’ll give poetry a try thanks for the recommendation

Collapse
stevepryde profile image
Steve Pryde

Poetry is very similar to pipenv in both the cli args and purpose. I have used both and poetry is much better in my opinion. It is also more actively maintained.

Thread Thread
asjadanis profile image
Asjad Anis Author • Edited on

Will definitely give it a try but definitely looking forward to a local packages directory 🙏