5 ms·
sudo pip install? Really? You almost never want to use the system Python. Use pyenv[0] to install the version of Python you want, and then create a new virtual
by haikuginger 9y ago
sudo pip install? Really?
You almost never want to use the system Python. Use pyenv[0] to install the version of Python you want, and then create a new virtual environment for each project.
[0]https://github.com/pyenv/pyenv https://github.com/pyenv/pyenv
- cdubzzz 9y agoSee also: pipenv http://docs.pipenv.org/en/latest/ http://docs.pipenv.org/en/latest/
- brittohalloran 9y agoWhat are your thoughts on conda instead of virtualenv?
- mythrwy 9y agoNot the person you asked, but I personally don't care for conda. I'd rather use standard Python packaging and virtual environments. Conda had a few "funnies", like adding lines to .bashrc interfering with system Python when I tried to use it later (easily fixed and not really a big deal, I just didn't care for it). A client had some scripts that used it, and from that perspective I guess it saved a little time installing everything but not much. Not enough to have another Python version floating around in my opinion. Easy enough to just use regular Python.
- mythrwy 9y agoThat is addressed right before `sudo pip install`. FTA: "Install using pyenv, pipenv or virtualenv. If you are feeling brave, install with pip:"
- e12e 9y agoI can't think of a situation where plain "pip install" doesn't work that the correct fix is to use sudo. I strongly think that if you're going to give advice on how to install, then you'd be better off suggesting: python3 -m venv speech-venv ./speech-venv/bin/pip install ... # or activate and use "pip install"
- jgalt212 9y agoyou need sudo for PyCryto or you need to su root b/c when it compiles on linux it needs to write to tmp directories that normal users cannot.