5 ms·
Well pip install library needs root, which you probably don't have. So now you have to teach them about making, and acitvating, virtual environments. Also, the
by CJefferson 8y ago
Well pip install library needs root, which you probably don't have. So now you have to teach them about making, and acitvating, virtual environments.
Also, they can't easily search through the packages in a nice GUI and just click on the one they want to install.
- ekianjo 8y agoAnd pip s upgrade process for packages is almost non existent, while R supports that very, very easily.
- Giroflex 8y agoNever had any trouble with `pip install --upgrade library`. Not sure if there's support for upgrading all packages at once, though.
- ekianjo 8y agoThere is no such support for multiple packages at once. R can do it though.
- scaryclam 8y agoYou can certainly update multiple packages at once using pip. Just use a requirements.txt file, which you should be doing anyway if you're using multiple packages (or just want to be able to reproduce your environment).
- Giroflex 8y ago>pip install library needs root Hmm, not really. It's actually advised against [1]. [1] - https://askubuntu.com/questions/802544/is-sudo-pip-install-still-a-broken-practice https://askubuntu.com/questions/802544/is-sudo-pip-install-s...
- newen 8y agoPip install needs root on my ubuntu install, my lab's and university's old redhat servers and my windows for linux install. I've had to install anaconda python to get any real work done on all three systems. Anaconda works fine for me but I've not even had to think about anything to install packages in R.
- sdabdoub 8y agotry pip install --user or virtualenvs
- rspeer 8y agoUbuntu doesn't ship with pip or virtualenv. In fact it ships with a version of Python where the built-in equivalent to virtualenv, pyvenv, is explicitly disabled. So you have to install extra Python packages, as root. You have to have that Python experience that guides you to install as few of them as you can, just enough so you can get started with a virtualenv, so you don't end up relying on your system Python environment. And this is really hard to explain to people who aren't deeply familiar with Python. "Never use sudo to install Python packages! Oh, you got errors. We obviously meant use sudo for two particular packages and never again after that." In the terrible case where you don't have root, you have to ignore Ubuntu's version of Python and compile it yourself from scratch. Hope the right development libraries are installed! Maybe I'm wrong and there's a method I've overlooked. If there is: please show me how to install a Python package on a fresh installation of Ubuntu 16.04, without ever using sudo, and I will happily spread the good news.
- int_19h 8y agoThat sounds like a major problem with Ubuntu, rather than with Python or pip. On Windows, meanwhile, the standard Python installer gets all this set up properly in like three clicks. Better yet, because it installs per-user by default, "pip install" just works. And if you still choose to install it globally, it will fail, but it will tell you exactly what you need to do to make it work: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: ... Consider using the `--user` option or check the permissions. One can't help but wonder how we ended up in a situation where the most popular Linux distro somehow does Python worse than Windows.
- nzjrs 8y agoThis is bad advice. Pip should be used in virtual environments, and not to install system packages
- txcwpalpha 8y agoWhile you're right that it's bad advice, it also highlights the problem with pip that these less experienced people have. The ideal way to deal with Python packages is virtualenvs, but setting up a virtualenv, and then activating it every time you want to use it (or setting up tools to do it for you) is an incredibly huge headache for less experienced people to deal with. R doesn't require that whatsoever.
- jupiter90000 8y agoNeither language requires an isolated dev environment, but it can help with avoiding headaches. As python has things like virtualenv and buildout, fortunately R has 'packrat' available, which provides a similar isolated/reproducible dev environment solution. https://rstudio.github.io/packrat/ https://rstudio.github.io/packrat/
- int_19h 8y agoThere's nothing wrong with pip for installing per-user packages outside of virtual environments.