VarianAPIs / PyESAPI

Python interface to Eclipse Scripting API
MIT License
69 stars 32 forks source link

Problem with 'import pyesapi' #26

Open maksymfritsak opened 10 months ago

maksymfritsak commented 10 months ago

Hello, Installation was without any errors. However, when I run "import pyesapi" the following exception pops up:

Exception Traceback (most recent call last) Cell In[2], line 1 ----> 1 import pyesapi 2 #import atexit 3 #app = pyesapi.CustomScriptExecutable.CreateApplication('python_demo') 4 #atexit.register(app.Dispose);

File ~\AppData\Roaming\Python\Python311\site-packages\pyesapi__init__.py:44 41 paths = [os.path.join(drive, os.sep, base, ver, rp) for rp in rpaths] 43 if len(paths) < 2: ---> 44 raise Exception("Did not find required library paths! Searched for:\n %s" % (",\n".join(searched_paths))) 45 if len(paths) > 2: 46 print("WARNING: Found multiple possible VMS dll locations:\n %s" % (",\n".join(paths)))

Exception: Did not find required library paths! Searched for: C:\Program Files (x86)\Varian\RTM\%version\esapi\API, C:\Program Files (x86)\Varian\RTM\%version\ExternalBeam, D:\Program Files (x86)\Varian\RTM\%version\esapi\API, D:\Program Files (x86)\Varian\RTM\%version\ExternalBeam

How one can solve this? Best wishes, Maksym

mvarsta commented 9 months ago

PyESAPI is pythonnet wrapper over ESAPI/Eclipse and requires Eclipse installation to work. The exception tells that PyESAPI cannot find the requisite libraries in expected locations so try on machine with Eclipse installation at hand. ESAPI alone will not cut it because ESAPI, which is UI-less Eclipse client with some restrictions, relies on Eclipse proper.

fizxmike commented 1 day ago

Hi @maksymfritsak, Can you confirm if you are trying to run PyESAPI from an Eclipse TBOX or VIC environment?