Mojo Versioning System
How is MOJO planning to handle version system or so?
The way python does it right now is very messy, you get multiple versions of python installed on the same machine, and then sometimes when you install packages using pip, they go in site-packages of old versions and are not available for newer versions when trying to use them etc.
Some information on this would be really helpful
8 Replies
We don't have specific plans around this - mojo is still very early and evolving fast, so the best thing is to "always be upgrading" for awhile.
As it settles out, we can choose to provide a stable ABI so things end up working more like the C/C++ ecosystem, which doesn't have any of these problems.
Umm, okay,
However, I have a request if possible,
Not right now, but later around the first stable releases or so,
Can we have a way to choose what version of the language will be used to compile or execute the code?
Like a shebang or something?
In the code itself
I have not found it messy with Python because I mostly work in a virtual environment, package installs do not conflict.
Short version? I don't see anything wrong with how it's done in Python, not that it's Python's fault anyway
I installed multiple versions of python in my system and I don't use virtual environments for most cases, as I install packages and use it in multiple different folders and places
It feels very very messy to me only because, at times the error is undetectable for many people specially the new ones
It just shows no module named xyz
And when you do pip install xyz, it says already installed or successfully installed
That is interesting, it should normally just use the default Python for installations if you don't specify a version (or whatever version is set as python3 symlink in the usr/bin directory).
To work with multiple Python versions without creating a virtual environment you can use specific versions. i.e python3.9 -m pip install <package>
Umm okay that is interesting, never knew that I could install a package for the specific version
This solves my problems
Thanks a lot
Interesting to think that a stable ABI will eliminate some package versioning issues! Not sure I understand how that works in practice, but looking forward to learning.
@Kushagra also good to be aware that virtualenvs are actually built into python now- you don't even need any special dev tools to use it:
Now the commands python or pip will use the one inside the current venv.
rust is often praised for its packaging story, maybe there are some ideas we could take from there?