cmbruns / pyopenxr

Unofficial python bindings for OpenXR access to VR and AR devices
Apache License 2.0
103 stars 8 forks source link

Incomplete pip release? #81

Closed nhammond129 closed 2 years ago

nhammond129 commented 2 years ago

When installing pyopenxr-1.0.2401 on windows 10 for python 3.10, trying to import gives me an ImportError out of the box:

import xr

# Query the available VR/AR extensions
available = xr.enumerate_instance_extension_properties()
print([i for i in available])

->

Traceback (most recent call last):
  File "C:/Users/nhamm/Desktop/xr_test.py", line 1, in <module>
    import xr
  File "C:\Program Files\Python310\lib\site-packages\xr\__init__.py", line 1, in <module>
    from . import (
ImportError: cannot import name 'api_layer' from partially initialized module 'xr' (most likely due to a circular import) (C:\Program Files\Python310\lib\site-packages\xr\__init__.py)

Downloading the repo as a zip and dragging the apparently-missing api_layer and extension folders into C:\Program Files\Python310\lib\site-packages\xr\ resolves, but likely something's up with the instance on pip for py3.10

cmbruns commented 2 years ago

Thanks for investigating and reporting this. I probably neglected to update the setup configuration correctly.

cmbruns commented 2 years ago

@nhammond129 Thank you very much for bringing this to my attention. Could you please try uninstalling then reinstalling the new 1.0.2402 version then report back here whether the problem is resolved?

timrobot commented 2 years ago

When attempting to run import xr on both windows and linux, I get the error No module named 'xr.api_layer.windows' and No module named 'xr.api_layer.linux'

cmbruns commented 2 years ago

Well we are getting closer. Please try 1.0.2403.

I suppose this means it's about time for me to set up continuous integration for this project.

Thank you for reporting the problems.

timrobot commented 2 years ago

Alright, works now. Thanks @cmbruns!

cmbruns commented 2 years ago

Awesome! Thank you so much @timrobot for your help and patience.

nhammond129 commented 2 years ago

Could you please try uninstalling then reinstalling the new 1.0.2402 version then report back here whether the problem is resolved?

Sorry for the slow reply, but works for me now as well! Thanks @cmbruns !

Future google delvers: Fixed as of 1.0.2403, and double-check that you're doing pip install --upgrade pyopenxr and not pip install --upgrade openxr as I just did for a good 20 minutes with much confusion.