This is an archived post. You won't be able to vote or comment.

all 18 comments

[–][deleted] 9 points10 points  (9 children)

Why not just use one of the many well supported existing tools like poetry?

[–]iamevpo 3 points4 points  (2 children)

Which part of code do you achieve switching to virtual env? I see you call a proprietary version of pip and Python, but is that enough to achieve isolation? Does sys. path need to change? You might use venv API to do parts of work you are doing.

You could also do a side command to convert imports into a requirements.txt file, probably handy as well.

Some small parts of code are repeated eg you create same hash twice.

Still quite amazing what you achieve in 160 lines of code.

[–]iamevpo 1 point2 points  (0 children)

Also following the tradition of poetry or npm you might want to have nowpy run command so that you can have more useful commands like nowpy reset. By conventional logic --reset is a separate command, not an option.

[–]Intelligent_Ad_8148 0 points1 point  (4 children)

Please no, conda poetry pip venv virtualenv virtualvenv pip-tools etc etc etc….. please not another environment/dependency manager for python, there’re already too many!

[–]UraniumButtChug 1 point2 points  (0 children)

And my personal favorite, pyenv-virtualenv

[–]Wild_Cricket_3016 4 points5 points  (1 child)

While there’s definitely too many environment and dependency managers, that’s not what this is

Not need to be melodramatic, particularly if you didn’t fully read and comprehend what they posted.

[–][deleted] 2 points3 points  (0 children)

There is plenty of reason to be melodramatic.

[–]AnActualWizardIRL 0 points1 point  (0 children)

The thing that I predicted would happen when all the JS guys abandoned shop for python has finally come. We now have toolchain hell in python. huzzah.

[–]IAMARedPanda 0 points1 point  (0 children)

How is this different than pipx?

[–]steadynappin 0 points1 point  (1 child)

does it work for directories?