-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Labels
Description
Hi, I'm trying to setup a conda environment to code in Spyder.
However, when I try to import openvr, I get a FileNotFoundError on the dll.
I found that adding CONDA_DLL_SEARCH_MODIFICATION_ENABLE=1 is not enough (related issue). I get a WinError deeper in the callstack.
To recreate
conda create -n openvr-env python -y
conda activate openvr-env
pip install openvr
python
import openvr
Traceback
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\<User>\miniconda3\envs\openvr-env\lib\site-packages\openvr\__init__.py", line 64, in <module>
_openvr = cdll.LoadLibrary(_openvr_lib_name)
File "C:\Users\<User>\miniconda3\envs\openvr-env\lib\ctypes\__init__.py", line 460, in LoadLibrary
return self._dlltype(name)
File "C:\Users\<User>\miniconda3\envs\openvr-env\lib\ctypes\__init__.py", line 382, in __init__
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'libopenvr_api_64' (or one of its dependencies). Try using the full path with constructor syntax.
OS: Windows 64bit
Possible fix
Always import the full path has it is done for Linux (line 62 in openvr_init_.py).
This works fine in conda and in standard python install.
Reactions are currently unavailable