PI-PhysikInstrumente / PIPython

Python Library for using PI controllers with GCS command language
28 stars 3 forks source link

libpi_pi_gcs2.so not found #12

Closed francdoc closed 1 year ago

francdoc commented 1 year ago

Hi, I keep getting this error. I cloned this repo and ran the installation commands. Can you tell me how to get this shared object file please? Maybe I did something wrong.

>>> from pipython import GCSDevice
>>> pidevice = GCSDevice('C-884')
>>> pidevice.InterfaceSetupDlg()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.10/dist-packages/pipython/pidevice/common/gcsbasedevice.py", line 131, in InterfaceSetupDlg
    self.dll.InterfaceSetupDlg(key)
  File "/usr/local/lib/python3.10/dist-packages/pipython/pidevice/interfaces/gcsdll.py", line 376, in InterfaceSetupDlg
    self._id = getattr(self._handle, self._prefix + 'InterfaceSetupDlg')(key)
  File "/usr/local/lib/python3.10/dist-packages/pipython/pidevice/interfaces/gcsdll.py", line 277, in _handle
    raise IOError('%r not found' % self._dllpath)
OSError: '/home/.../PIPython/libpi_pi_gcs2.so' not found
>>> 

I'm running Ubuntu 22.04 LTS.

Thanks in advance

iancynk commented 2 months ago

Hi, I have the same issue. @francdoc how have you solved it?

francdoc commented 2 months ago

Yes, let me review it and I'll let you know how I solved it.

Steffen-W commented 1 month ago

I have the same error on Linux Mint 21.3. I have installed the package via pip install PIPython. What could be the problem?

francdoc commented 1 month ago

Hi @Steffen-W and @iancynk.

I changed my strategy towards controlling the device. You can check out the updated approach in my project repository.

First install the PIPython package using the next command:

sudo pip3 install PIPython

Install the required Python packages:

sudo pip3 install PyUSB PySocket PySerial

Now follow the next readme instructions to install the drivers:

1) Unzip the PI_drivers folder on a Linux PC or laptop. 2) Make the INSTALL script executable:

sudo chmod +x ~/PI_drivers/Linux/PI_E727-1.3.0.0-INSTALL/PI_E727/INSTALL

Run the INSTALL script:

sudo ./INSTALL

Testing the Setup:

Once you've completed the installation, try executing some of the instructions provided in the readme.

You can also test the device control functionality by running a small API that I developed. This API allows the device to execute a predefined path, which is configured through a CSV file.

You will have to adapt this line of code to the device you are using. In my case I have the P-541.2DD. Take a look at this function as well, you might need to edit it according to your needs.

I'm using Ubuntu 22.04.4 LTS.

Hope this helps.

Steffen-W commented 1 month ago

Hi @francdoc, thank you very much for your explanation. Which PI_drivers zip file do you mean exactly. I can't find it anywhere. Many thanks in advance.

francdoc commented 1 month ago

Hi @Steffen-W, No problem. In my case, the drivers came on a disk with the device. Have you tried reaching out to support for help with this issue?

I have the drivers for this exact controller.

Steffen-W commented 4 weeks ago

I have added it below so that not everyone has to search for it themselves. “PI GCS2” was only required for me, the other items could be rejected. I would really like to see @Software-PhysikInstrumente make this more user-friendly without everyone having to figure it out for themselves.

# sudo ./INSTALL --x86_64
Read the General Software License Agreement? [ynq]: y
Do you agree to the General Software License Agreement? [yn]: y
Install the PI GCS2 Controller x86_64 high level GCS library? [ynq]: y

PI_Application_Software.zip