FileNotFoundError: Could not find module 'libopenvr_api_64' on Windows with Anaconda
See original GitHub issueHi, 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.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
FileNotFoundError: Could not find module when using jupyter ...
Same problem occured when trying to import sklearn. The version of my scipy is 1.6.3 and i solved the problem by degrading scipy...
Read more >Troubleshooting — Anaconda documentation
I'm having trouble with the Anaconda installer on Windows. How can I debug my issue? Cannot get conda to run after installing; Recovering...
Read more >How to Setup Your Python Environment for Machine Learning ...
In this tutorial, you will discover how to set up a Python machine learning development environment using Anaconda.
Read more >Troubleshooting — conda 22.11.1.post16+ce4e810c9 ...
Unicode error after installing Python 2. Windows environment has not been activated. The system cannot find the path specified on Windows ...
Read more >Fix Anaconda + Jupyter Notebook "module not found" errors ...
Did you install Anaconda but Jupyter Notebook can't find Anaconda ? Or you run Jupyter but nothing seems to be installed?
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You are totally right.
pkg_resources
is a serious improvement.I agree with you, python 3.7 as a requirement seems reasonnable.
I miss use the term “cross platform”. I meant it would add a dependency. Cross install would make more sense. It doesn’t really matter anyway.
I tested both
pkg_resources
and you’re latest switch toimportlib
both work like a charm on windows in my conda environment.@Florian-Cormee that’s great news! Thanks for testing and reporting. By the way, I will probably go back to pkg_resources, because I found a problem with importlib on python 3.8, and python 3.8 will likely be the system python on Ubuntu LTS at least until April 2022. Eventually when python 3.8 is no longer important, it will be time to move to importlib.