Re:Pkl, a Programming Language for Configuration
by lijok on Saturday February 03, 2024 @09:15AM
(#39240511)
Did you activate the virtual environment?
For all the flak python gets, dependency setup is pretty simple if you're not flailing around aimlessly
python3.12 -m venv --copies --clear --upgrade-deps ".venv"
source ".venv/bin/activate"
python -m pip install --upgrade pip setuptools wheel
python -m pip install --editable .
Re:Pkl, a Programming Language for Configuration
by laserlight on Saturday February 03, 2024 @01:44PM
(#39243374)
Yes, I had activated the virtual environment. Thanks for the guide. It works without problems. I had used `virtualenv venv -p /usr/local/bin/python3.12` in my setup. Yours seems to be a better way.
Re:Pkl, a Programming Language for Configuration
by lijok on Saturday February 03, 2024 @03:15PM
(#39244296)
That right there is the main problem with python dependency management - too many damn ways to do the same thing.
And to think "There should be one-- and preferably only one --obvious way to do it." is in the Zen of Python...
Yesterday, I created a virtualenv, then ran `pip install`, only to see it fail. I found out that even `pip --version` was failing. I discovered that running `python -m ensurepip --upgrade` would fix pip. It did fix pip, but `pip install` still didn't work properly. I figured out that pip was reporting a different version of python than the one virtualenv is using. Running `python -m pip install --upgrade pip` upgraded pip, which should have been accomplished with the previous ensurepip command. Finally, everything was working properly.
I experienced these problems after years of experience in python. To answer the question. Yes, it's worth adopting yet another DSL than using python.