tusharsadhwani / yen

The last Python environment manager you'll ever need.
MIT License
137 stars 9 forks source link

The virtualenv `venv` directory does not have `activate` script #23

Closed avinassh closed 1 week ago

avinassh commented 1 week ago

I installed the latest 0.5 yen via install.sh (I am on macOS Sonoma 14.5):

yen --version
yen-rs 0.5.0

but when I tried creating a new virtualenv, it doesn't seem to have the activate file:

$ yen list

Available Pythons:
3.12.3
3.11.9
3.10.14
3.9.19
3.8.19

$ yen create -p 3.12 venv
Created venv with Python 3.12.3 ✨

$ source venv/bin/activate
source: no such file or directory: venv/bin/activate

$ ls venv/bin
pip3       pip3.12    python     python3    python3.12
tusharsadhwani commented 1 week ago

Right. microvenv leaves the job of activation to the users, that got overlooked somehow.

I'll get this fixed.

avinassh commented 1 week ago

btw have you considered adding a help command like: yen activate venv

tusharsadhwani commented 1 week ago

btw have you considered adding a help command like: yen activate venv

Not a bad idea! Maybe even yen activate because generally there will only be one venv in there.

I'll make this as well.

avinassh commented 1 week ago

yeah, venv being default dir. but you don't take default for yen create. May be that can done too.

$ yen create -p 3.12 
$ yen activate
$ profit???
tusharsadhwani commented 1 week ago

That's true. also other than create, all yen commands have a default Python version of 3.12 as well. Could technically omit that too.

tusharsadhwani commented 1 week ago

v0.5.1 is out, and this should be fixed. Rookie mistake there, was missing some test coverage.

Re-run curl -L yen.tushar.lol/install.sh | sh, it should update your binary, and then see if it's good?

avinassh commented 1 week ago

works.

thanks for the great tool 🫡