rticommunity / connextdds-py

Connext DDS Python API
Other
26 stars 12 forks source link

Code working for python 3.10 and not for 3.7 #45

Open sahilkap07 opened 2 years ago

sahilkap07 commented 2 years ago

I have both python 3.7 and 3.10 on my windows 10 machine with RTI 6.0.1 (platform- x64Win64VS2017) and tried following the install instructions (not for development) for both of them. Firstly, I tried to clone and install it for python 3.7 by passing in the '--python-root' option as my python 3.7 path for the initial configure command as py -3.7 -m configure.py x64Win64VS2017 --python-root "C:\<user.name>\AppData\Roaming\Python\Python37" followed by py -3.7 -m pip install . However, when I try to import rti.connextdds I get an error: "ModuleNotFoundError: No module named 'rti.connextdds' ". image I did check the site-packages for python 3.7 and it has a library file with the name 'connextdds.cp310-win_amd64.pyd' in rti directory which seems a python 3.10 version instead of 3.7. I am not sure why is it using 310 version when I specifically passed 3.7 as python root.

Secondly, I tried the same procedure with version 3.10 in place of 3.7 and everything seems to work fine.

I have checked the README and it says that it supports Python 3.x with pip. Basically, just want to run it for python 3.7, but it appears that it might be building a 310 pyd file anyway. My questions are :

  1. Is it possible to install it correctly for 3.7 version of python so that it works?
  2. If it is possible to do so, am I missing on something (flags possibly) because it seems to build a dynamic lib (.pyd) file for 3.10 python even if I try to do so for 3.7?