[Tutor] Noob seeking help (Linux related)

Mats Wichmann mats at wichmann.us
Mon Sep 2 16:08:09 EDT 2019


On 9/2/19 12:36 PM, Matthew Ngaha wrote:
> I'm thinking about installing openSuse Linux. They have 2 versions
> available. 1) Leap (A stable release) 2) Tumbleweed (A rolling
> release). Stable means all software remains the same and does not get
> upgraded. To upgrade you need some proficiency in Linux. So if you
> have Python 3.5 you will have to upgrade yourself and I hear this
> might not be safe.

Just don't replace the system Python and everything's fine.  It's easy
enough to pull whatever version you want to work with and install it in
some suitable place.

> Rolling release means the repositories are updated
> constantly and if you run a command on the command line your OS will
> be updated where by all the software installed on your computer gets
> automatically upgraded to match the repositories.
> 
> Okay with that out of the way, and as a Python user, I need advise on
> which to get and which is better for a developer (beginner noob with
> little Linux experience). I will mainly use Python and Django. Django
> releases new versions really regularly and these newer versions stop
> supporting older Python versions. so if I get Leap (stable version)
> there will come a time where I will need to update Python, or get
> stuck with an out of date Django version. I won't have this trouble if
> I install Tumbleweed (rolling release) as Python will be updated but
> my concern is if I write code for say Python 3.6 or 3.7 then months
> later 3.8 comes out, will it break my code or is porting over code
> fairly easy to do?
> 
> Lastly, someone I asked said something about virtualenv. If my OS has
> Python 3.6, can that same OS without updating Python use virtualenv to
> install Python 3.7, even though the installed Python on the system is
> Python 3.6?

See above.

I use a package called pyenv to help manage lots of versions of Python,
works for me but isn't the only solution out there.

$ pyenv install --list    # all the available versions (*)
$ pyenv install 3.7.4     # pick one
$ pyenv virtualenv 3.7.4 mypy374   # create a virtualenv from it
$ pyenv activate mypy374  # start the virtualenv
$ python -m pip install django     # theoretical: there are actually
many Django pieces

https://github.com/pyenv/pyenv
https://github.com/pyenv/pyenv-installer

and a useful offsite tutorial:
https://realpython.com/intro-to-pyenv/

(*) note these versions are actually recipes to build, pyenv will
arrange to compile the python using the recipe. Just glanced at the
tutorial and it talks more about this.

> Please put yourself in my shoes and tell me which OS out of the 2 is
> better for me or a developer.

Not gonna tell you that, because we still can't know which is better for
your case, it depends on many more factors.  Using an isolated
environment for Python and Django should protect you from whatever the
distribution is doing.  There was a time in the past I would have
suggested a newcomer to always use something more stable but people
doing rolling distributions, and build-your-own distributions, and other
variants that keep changing, have gotten quite good at making it go
smoothly so as long as you can arrange your key work not to be
disrupted, either way could work.  You can even do both.... install the
stable version, make a virtual machine and install the rolling version
in it and you can test things both ways if you have something you're
worried about.






More information about the Tutor mailing list