-
Notifications
You must be signed in to change notification settings - Fork 13
reticulate python rstudio #20
Comments
@ryangarner Thanks for opening this issue, yeah, it would be nice if @noamross would love your thoughts on how best to go about this. In particular, as you know Debian/Ubuntu use separate namespaces for @choldgraf could probably set me straight on the best way to go about the python virtualenv setup here. |
hmm - is the main question "how are environments set up with virtualenv in Python?" - e.g., is this a file paths problem? |
Thanks Chris, I guess this is really two questions: Q1. What's the best way to set up a Python3 environment for Docker images? As you know, ubuntu/debian distros expect users to explicitly request Q2. What's the best choice for managing python environments in our context --
|
sorry for the slow response - I'm actually not a super expert on python paths so may not be the best person to ask, but my undersatnding is: The simplest for generic data science workflows that might not involve Python packages is to us miniconda to handle environments, along with the I don't believe that you must use pip with root privileges. Couldn't you install using the @yuvipanda might have some ideas for the best path forward here as well! ps: for the MKL stuff, that might be the case...I've had differing results using MKL vs. BLAS for linear algebra stuff - I think it depends a lot on the specific computation you're running |
If you're already using system python, my recommendation is:
This should work for 99% of use cases. The big reason to move away from this is if you want to use a version of python different from what is provided by your system python. If you need to use a newer version of python, my recommendation is to use miniconda to get just python, but still use a virtualenv for everything else. |
This is my quick fix Dockerfile to get
|
@ryangarner thanks. Yup, doing
(note that in general you want to have If you wanted to stick with the python3 versions (Tensorflow plans to deprecate python 2 in the next year anyway) you'd do
but reticulate won't find I quite like @yuvipanda 's proposed workflow above, so I'll give a stab at that. In particular, it sounds like step 3 will make |
@cboettig it shouldn't mess anything up, since it's only for things that run with the specific PATH set (so things started by the user in this container). This is also how mybinder.org runs (python refers to python3 there), so I think it's ok! |
@ryangarner if you use
things should work as expected. you may want to set Not sure what is up with |
linking rstudio/reticulate#496 as related. |
thanks Yuvi! Digging a bit more this seems to be a problem in the |
Can we get
rocker/ml
androcker/ml-gpu
to work withreticulate
on RStudio?python: /usr/local/bin/python
libpython: /usr/lib/python3.5/config-3.5m-x86_64-linux-gnu/libpython3.5.so
pythonhome: /usr:/usr
version: 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516]
numpy: /usr/local/lib/python3.5/dist-packages/numpy
numpy_version: 1.16.3
python versions found:
/usr/local/bin/python
/usr/bin/python
/usr/bin/python3
Error: Prerequisites for installing Python packages not available.
Please install the following Python packages before proceeding: pip, virtualenv
The text was updated successfully, but these errors were encountered: