cmbruns / pyopenvr

Unofficial python bindings for Valve's OpenVR virtual reality SDK
BSD 3-Clause "New" or "Revised" License
245 stars 39 forks source link

hellovr_glfw.py ModuleNotFoundError: No module named samples #78

Open NumesSanguis opened 4 years ago

NumesSanguis commented 4 years ago

Tried to run hellovr_glfw.py script, but encountered the error: ModuleNotFoundError: No module named 'samples'.

Encountered no problems with the small script in the README.md.

Full Traceback

pyopenvr/src/samples/glfw$ python hellovr_glfw.py 
Traceback (most recent call last):
  File "/home/stefempath/anaconda3/envs/vr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 359, in get_provider
    module = sys.modules[moduleOrReq]
KeyError: 'samples'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "hellovr_glfw.py", line 943, in <module>
    sys.exit(main(sys.argv))
  File "hellovr_glfw.py", line 927, in main
    if main_application.b_init():
  File "hellovr_glfw.py", line 211, in b_init
    self.b_init_gl()
  File "hellovr_glfw.py", line 230, in b_init_gl
    self.set_up_texture_maps()
  File "hellovr_glfw.py", line 743, in set_up_texture_maps
    ts = pkg_resources.resource_stream('samples', 'cube_texture.png')
  File "/home/some_user/anaconda3/envs/vr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1150, in resource_stream
    return get_provider(package_or_requirement).get_resource_stream(
  File "/home/some_user/anaconda3/envs/vr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 361, in get_provider
    __import__(moduleOrReq)
ModuleNotFoundError: No module named 'samples'

System

Env creation steps:

conda create --name vr python=3.7
conda activate vr
pip install openvr
conda install -c conda-forge glfw
pip install glfw
conda install numpy
conda install pyopengl
conda install pillow