Re:Nvidia announces Jetson Nano 2GB, a single board computer
by Yajirobe on Monday October 05, 2020 @12:11PM
(#24689030)
u can use virtual environments for that
[ Parent
| on HN ]
Re:Nvidia announces Jetson Nano 2GB, a single board computer
by giancarlostoro on Monday October 05, 2020 @12:35PM
(#24689313)
In the case of 'Python Virtual Environments' you'd still have to install another version of Python which is non-trivial with Debian based systems without causing some sort of collision, unless you download the binaries to /usr/ or other bin location as suggested.
Re:Nvidia announces Jetson Nano 2GB, a single board computer
by TYPE_FASTER on Monday October 05, 2020 @12:41PM
(#24689364)
I like to use pyenv for this purpose, as it "virtualizes" Python versions by installing them locally as you mention. Then you just point each virtualenv at the Python binary for the version installed via pyenv. pyenv + virtualenv + virtualenvwrapper have greatly reduced Python dependency issues for me.
Re:Nvidia announces Jetson Nano 2GB, a single board computer
by giancarlostoro on Monday October 05, 2020 @12:51PM
(#24689479)
A bunch of programming languages do a little bit similar like Node has Node Version Manager or nvm, I think Go has GVM, Rust just has Rust Up, they usually install in your home folder and let you swap between versions globally, I've yet to have to do this as I usually spin up a VM if I know I'm going to need to deploy to a very specific version of Debian / Ubuntu, a virtual environment might not match behavior on the actual target system but a VM definitely will.
Re:Nvidia announces Jetson Nano 2GB, a single board computer
by fidelramos on Monday October 05, 2020 @01:10PM
(#24689685)
+1 to pyenv. And it's even better if you combine it with pipenv [1]: pipenv manages dependencies its own file (Pipfile) which can also specify the required Python version. Pipenv integrates with pyenv so if the required Python version is not available it will offer to download and install it.
Tldr; with pyenv and pipenv installing a Python project is just "pipenv install".
Re:Nvidia announces Jetson Nano 2GB, a single board computer
by strbean on Monday October 05, 2020 @02:31PM
(#24690545)
I would strongly recommend taking a look at Poetry as an alternative to Pipenv.
Pipenv is honestly a nightmare.
Re:Nvidia announces Jetson Nano 2GB, a single board computer
by fidelramos on Friday October 09, 2020 @04:43AM
(#24728016)
I have been using pipenv only on a couple of projects and for a few months, but it has been an improvement over pip and virtualenv.
Why do you say Pipenv is a nightmare? Have you had bad experiences with it?
Re:Nvidia announces Jetson Nano 2GB, a single board computer
by kstrauser on Monday October 05, 2020 @03:00PM
(#24690840)
I regret I can only upvote this once. Pipenv still gets press, but I'm not sure why. Every senior dev I know switched to Poetry long ago.
Re:Nvidia announces Jetson Nano 2GB, a single board computer
by freeone3000 on Monday October 05, 2020 @05:36PM
(#24692315)
It's totally trivial. ubuntu 18.04 has packages for python3.7 and python3.8 which install to /usr/bin/python3.7 and /usr/bin/python3.8, leaving /usr/bin/python3 pointing to /usr/bin/python3.6. So, you'd type:
`sudo apt -y install python3.7`
Then:
`mkvirtualenv --python $(which python3.7)`
It really is that easy.
Re:Nvidia announces Jetson Nano 2GB, a single board computer
by beagle3 on Monday October 05, 2020 @04:34PM
(#24691723)
Especially in the case of a python virtual environment, "conda" solves everything ultra cleanly (regardless of whether it's debian, fedore, arch or Windows and probably macOS too though I didn't try).
It provides any version of Python, regardless of what your base system has (or lacks). It also provides an isolated gcc and many other packages; and you can still "pip install" inside it if the package you need is not conda-native, and conda will track it just as well.
Conda is really underappreciated.