Coder Social home page Coder Social logo

Comments (7)

jjallaire avatar jjallaire commented on July 23, 2024

I'm not sure what's going on here. Some related discussion/threads:

ContinuumIO/anaconda-issues#443
http://stackoverflow.com/questions/33615829/vcruntime140-dll-error-after-creating-a-new-env-using-conda-for-anaconda-ide
http://stackoverflow.com/questions/40101662/python-win10-python35-dll-and-vcruntime140-dll-missing

from reticulate.

xarxziux avatar xarxziux commented on July 23, 2024

This might be a problem with the way reticulate and Conda handle the PATH environment variable.

If I run source activate dl3.5 from Git Bash, the directory /C/Users/xarxziux/AppData/Local/Continuum/Anaconda3/envs/dl3.5 gets added to the PATH variable, so vcruntime140.dll and python35.dll become available within that Conda environment, but I'm guessing reticulate doesn't do this? Are you able to confirm if that might be the problem?

from reticulate.

jjallaire avatar jjallaire commented on July 23, 2024

That definitely could be it! I just pushed a change to add the Python directory to the PATH for Anaconda on Windows: 2a552c6. Could you try again with this change?

from reticulate.

xarxziux avatar xarxziux commented on July 23, 2024

I tried that, but I'm getting a completely different error message:

Error in python_config(python_version, required_module, python_versions) : 
  Error 1 occurred running C:\Users\xarxziux\AppData\Local\PYTHON~1\x64\2.6\python.exe 
In addition: Warning message:
running command '"C:\Users\xarxziux\AppData\Local\PYTHON~1\x64\2.6\python.exe" "C:/Users/xarxziux/AppData/Local/R-3.3.0/library/reticulate/config/config.py"' had status 1 

I'm not sure where it's getting the Python 2.6 directory from as I don't see any setting in the , but it's the first of several Python directories on my PATH variable, so it may have something to do with my setup. I tried re-ordering my PATH so that the Anaconda3 directory comes first, but the result was the same.

It looks like the script is reading the default Python location rather than the Anaconda3 location, although that may have more to do with my messy configuration. However, I see on the commit history for the last commit, you are checking for config$anaconda, but setting the dirname on the next line to config$python. Should that not be config$anaconda as well?

from reticulate.

jjallaire avatar jjallaire commented on July 23, 2024

That script is just designed to to probing of various python versions (it actually runs against all of your detected configurations).

config$anaconda is just a boolean indicating whether it's an anaconda version of python. config$python is the path to the python binary.

I'm not sure what else to do given the complexity of your setup, let me know what are able to sort out and I'm happy to make any required changes to the package to make configuration succeed without special intervention.

from reticulate.

xarxziux avatar xarxziux commented on July 23, 2024

Apologies for the complex set up :)

I don't actually use Python myself, but I've been tinkering with it recently so there's quite a few flavours on my machine. My goal here is to get RStudio linked with a Tensorflow-enabled Anaconda3 environment, which is what led me here. How do I tell reticulate where to find that environment? From what I can tell, it's pulling the data from the registry, in which case that's probably the official corporate location, but I've installed Tensorflow locally in a non-standard location. I've re-ordered my default PATH environment variable so that that location should be found first, but it's finding a 2.6 location that isn't even on my PATH. Can you please clarify how it's finding that?

Ideally I would like to be able to explicitly set the correct directory either by setting an environment variable, through a parameter in the use_condaenv() call, or by implying from the conda parameter, but I don't know how much extra work these would be. Other than editing the source code directly, do you know of a workaround for this?

from reticulate.

jjallaire avatar jjallaire commented on July 23, 2024

You can set a RETICULATE_PYHTON (or equivalently TENSORFLOW_PYTHON) environment variable which will receive the highest priority in scanning. Next after that is the first Python on the PATH, next after that is any Python referred to by use_python, use_condaenv, etc., and next after that is scanning the registry for installed versions. It won't use a version that doesn't match the architecture of your R session (32bit vs. 64bit) and it won't use a version that doesn't include tensorflow.

from reticulate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.