Hi Alexander,
I've reported this
issue here:
https://github.com/ContinuumIO/anaconda-issues/issues/1129
I can confirm I get
exactly the same error on Windows 10 with Anaconda3 (v4.2.0)
installed into my user directory. I cannot see any way to fix
this. I believe that will make this a priority issue for the
Anaconda team to address in the coming week or two. I'd watch
that issue above for progress (and give it a +1 if you want it
to have extra attention!).
In [2]: from rpy2 import rinterface
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
<ipython-input-2-40203d26f554> in <module>()
----> 1 from rpy2 import rinterface
C:\Users\ijsto\Anaconda3\lib\site-packages\rpy2\rinterface\__init__.py in <module>()
85
86 if sys.platform == 'win32':
---> 87 _load_r_dll(R_HOME)
88
89 # cleanup the namespace
C:\Users\ijsto\Anaconda3\lib\site-packages\rpy2\rinterface\__init__.py in _load_r_dll(r_home)
62 if r_bin not in os.environ.get('PATH'):
63 os.environ['PATH'] = ';'.join((os.environ.get('PATH'), r_bin, r_mod))
---> 64 ctypes.CDLL(r_dll)
65
66
C:\Users\ijsto\Anaconda3\lib\ctypes\__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error)
345
346 if handle is None:
--> 347 self._handle = _dlopen(self._name, mode)
348 else:
349 self._handle = handle
OSError: [WinError 126] The specified module could not be found
I also tried
uninstalling the Conda version of rpy2, and then attempted a pip
install of rpy2, but no luck there either (I think for different
reasons). Here is the GH issue reporting this:
```
C:\Users\ijsto>pip
install rpy2
Collecting rpy2
Downloading rpy2-2.8.3.tar.gz (186kB)
100% |################################| 194kB 84kB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File
"C:\Users\ijsto\AppData\Local\Temp\pip-build-kirh2vv0\rpy2\setup.py",
line 331, in <module>
ri_ext = getRinterface_ext()
File
"C:\Users\ijsto\AppData\Local\Temp\pip-build-kirh2vv0\rpy2\setup.py",
line 234, in getRinterface_ext
if rexec.version[0] == 'development' or \
File
"C:\Users\ijsto\AppData\Local\Temp\pip-build-kirh2vv0\rpy2\setup.py",
line 160, in version
universal_newlines = True)
File "C:\Users\ijsto\Anaconda3\lib\subprocess.py", line
626, in check_output
**kwargs).stdout
File "C:\Users\ijsto\Anaconda3\lib\subprocess.py", line
708, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command
'('C:\\Users\\ijsto\\Anaconda3\\R\\bin\\x64\\R', '--version')'
returned non-zero exit status 3221225781
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in
C:\Users\ijsto\AppData\Local\Temp\pip-build-kirh2vv0\rpy2\
```
Regards,
Ian
The problem happens because environments are not activated in the python script that menuinst uses to execute conda-installed sotware: https://github.com/ContinuumIO/menuinst/blob/master/cwp.py Changing that part of cwp.py
to the following:
env = os.environ.copy()
env['PATH'] = os.path.pathsep.join([
prefix,
join(prefix, "Scripts"),
join(prefix, "Library", "bin"),
join(prefix, "Library", "mingw-w64", "bin"),
env['PATH'],
])
How are you launching Python?
--
Anaconda Community Support Group Brought to you by Continuum Analytics
---
You received this message because you are subscribed to a topic in the Google Groups "Anaconda - Public" group.
To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/anaconda/Rt0wvugxr2Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to anaconda+unsubscribe@continuum.io.
To post to this group, send email to anac...@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/anaconda/.
Please try with the Anaconda Prompt from the start menu instead.
But also, conda has the concept of environment activation and deactivation and *not* using the Anaconda Prompt slips that stuff unfortunately. You can read a detailed discussion at:
--
Anaconda Community Support Group Brought to you by Continuum Analytics
---
You received this message because you are subscribed to the Google Groups "Anaconda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to anaconda+unsubscribe@continuum.io.
To unsubscribe from this group and stop receiving emails from it, send an email to anac...@continuum.io.