krishauser / Klampt

Kris' Locomotion and Manipulation Planning Toolkit
BSD 3-Clause "New" or "Revised" License
377 stars 96 forks source link

Get an error importing the _robotsim module when calling import klampt #104

Closed wanderin-earth closed 2 years ago

wanderin-earth commented 3 years ago

Hello! When I try running the Jupyter examples, an error occured and it reminded me that there's no _robotisim module. So I followed your instructions, using the Dependencies program to open _robotisim.pyd and found that WLDAP32.dll and WS2_32.dll had missing imports. What should I do next? Thanks.

krishauser commented 3 years ago

These are necessary system files, and it’s unclear why they aren’t working on your system. I suggest downloading them from a reputable site like the following link, and put the extracted DLLs in the folder containing robotsim.pyd.

https://www.dll-files.com/ws2_32.dll.html

wanderin-earth commented 3 years ago

I downloaded them and put them in the robotsim.pyd folder, but it was not so efficacious. And the error info seemed like this:


ImportError Traceback (most recent call last) D:\Anaconda\envs\klampt\Lib\site-packages\klampt\robotsim.py in swig_import_helper() 22 try: ---> 23 fp, pathname, description = imp.find_module('_robotsim', [dirname(file)]) 24 except ImportError:

D:\Anaconda\lib\imp.py in find_module(name, path) 295 else: --> 296 raise ImportError(_ERR_MSG.format(name), name=name) 297

ImportError: No module named '_robotsim'

During handling of the above exception, another exception occurred:

ModuleNotFoundError Traceback (most recent call last)

in 7 8 import time ----> 9 from klampt import * 10 from klampt.math import vectorops,so3,se3 11 from klampt import vis D:\Anaconda\envs\klampt\Lib\site-packages\klampt\__init__.py in 7 8 from .version import __version__ ----> 9 from .robotsim import * 10 import atexit 11 atexit.register(destroy) D:\Anaconda\envs\klampt\Lib\site-packages\klampt\robotsim.py in 31 fp.close() 32 return _mod ---> 33 _robotsim = swig_import_helper() 34 del swig_import_helper 35 else: D:\Anaconda\envs\klampt\Lib\site-packages\klampt\robotsim.py in swig_import_helper() 23 fp, pathname, description = imp.find_module('_robotsim', [dirname(__file__)]) 24 except ImportError: ---> 25 import _robotsim 26 return _robotsim 27 if fp is not None: ModuleNotFoundError: No module named '_robotsim' Would you be so kind as to help me with it? Thanks!
krishauser commented 3 years ago

Still a dependency issue, most likely. Could you show a screenshot of what libraries Dependencies says are missing?

wanderin-earth commented 3 years ago

1 2 These are the two files.

krishauser commented 2 years ago

It appears that these need to be in your windows/system32 folder. Something seems amiss with your windows installation, as these are standard system files.