pptk icon indicating copy to clipboard operation
pptk copied to clipboard

pip install pptk doesn't work on ubuntu 18.04/kubuntu 18.04

Open emantos opened this issue 6 years ago • 24 comments

Problem: After doing 'pip install pptk' on ubuntu/kubuntu 18.04, it doesn't work.

Diagnosis: The 'viewer' doesn't work because the libz.so.1 in site-packages/pptk/libs has some unresolved dependency issue.

Workaround:

  1. Rename the libz.so.1 in site-packages/pptk/libs e.g cd ~/.local/lib/python2.7/site-packages/pptk/libs/ mv libz.so.1 libz.so.1.old
  2. Create a soft link from /lib/x86_64-linux-gnu/libz.so.1 to the site-packages/pptk/libs cd ~/.local/lib/python2.7/site-packages/pptk/libs/ sudo ln -s /lib/x86_64-linux-gnu/libz.so.1

emantos avatar Oct 13 '18 03:10 emantos

hi, I have a similar problem, view gets stuck, and no output is printed (no error or warning). The above solution didn't work either...

skariel avatar Oct 15 '18 09:10 skariel

Doesn't work for me either on Debian Buster.

Also tried: ln -s /lib/x86_64-linux-gnu/libz.so.1.2.11 libz.s0.1

pptk doesn't hang anymore but I get no viewer window.

zbinkz avatar Dec 30 '18 01:12 zbinkz

Any news anyone ? I just installed this and on 18.04 also and I have the same problem.

jattiogbe avatar Feb 08 '19 11:02 jattiogbe

I'll chime in that this was needed (and fixed the problem) for me here as well, but that you obviously have to make sure you're doing it in the site-packages directory for the right version of python - many users now will be running 3.x not 2.7.

bk-mtg avatar Mar 25 '19 23:03 bk-mtg

Didn’t fix it for me. Already using /lib/x86..

dirkharmsmerbitz avatar Mar 29 '19 06:03 dirkharmsmerbitz

@emantos solution worked for me. thanks.

envs: OS ubuntu18.04 python 3.6 turboVNC

kentaroy47 avatar Apr 17 '19 05:04 kentaroy47

Commenting on behalf of conda/miniconda users: The correct path to the libz.so.1 you need to change is: <conda-dir>/envs/<env-name>/lib/python<X>.<Y>/site-packages/pptk/libs/ Or in <conda-dir>/lib/python<X>.<Y>/site-packages/pptk/libs/ if you're running in conda root.

Took me quite a while to figure out; I kept trying to link the libz.so.1 in <conda-dir>/lib/ and <conda-dir>/envs/<env-name>lib/ ...

robogast avatar Apr 23 '19 18:04 robogast

this works in conda

rfsch avatar Jun 17 '19 11:06 rfsch

I get the following error after following @robogast advice : failed to create symbolic link './libz.so.1': File exists

nihal-rao avatar Jun 17 '19 17:06 nihal-rao

@nihal-rao yeah you should still rename the already present libz.so.1 to something else like libz.so.1.old as OP states, otherwise the symlinking should obviously not work.

robogast avatar Jun 17 '19 17:06 robogast

Commenting on behalf of conda/miniconda users: The correct path to the libz.so.1 you need to change is: <conda-dir>/envs/<env-name>/lib/python<X>.<Y>/site-packages/pptk/libs/ Or in <conda-dir>/lib/python<X>.<Y>/site-packages/pptk/libs/ if you're running in conda root.

Took me quite a while to figure out; I kept trying to link the libz.so.1 in <conda-dir>/lib/ and <conda-dir>/envs/<env-name>lib/ ...

This works for me in Conda environment. Thank you.

tranvnhan avatar Aug 18 '19 05:08 tranvnhan

I solved it in another way. For conda users: I modified the file in <conda-dir>/envs/<env-name>/lib/python<X>.<Y>/site-packages/pptk/viewer/qt.conf As follows:

[Paths]
Plugins=<conda-dir>/plugins

chesc100 avatar Nov 21 '19 02:11 chesc100

@emantos Thank you very much! It works for me in python3.6

sumr4693 avatar Sep 04 '20 13:09 sumr4693

Problem: After doing 'pip install pptk' on ubuntu/kubuntu 18.04, it doesn't work.

Diagnosis: The 'viewer' doesn't work because the libz.so.1 in site-packages/pptk/libs has some unresolved dependency issue.

Workaround:

  1. Rename the libz.so.1 in site-packages/pptk/libs e.g cd ~/.local/lib/python2.7/site-packages/pptk/libs/ mv libz.so.1 libz.so.1.old
  2. Create a soft link from /lib/x86_64-linux-gnu/libz.so.1 to the site-packages/pptk/libs cd ~/.local/lib/python2.7/site-packages/pptk/libs/ sudo ln -s /lib/x86_64-linux-gnu/libz.so.1

It works for me in python3.7 and ubuntu 20.04, Thank you!

AlbertXu233 avatar Jan 12 '21 09:01 AlbertXu233

I'm still running into this issue on RHEL7. I tried the symlink solution with no success. Might be worth noting that I'm doing this with X11 on a remote cluster, but that shouldn't change anything, since I'm positive the X11 part is set up on the system side. Any suggestions?

rlangefe avatar Mar 20 '21 19:03 rlangefe

I'm also running into this problem. But I'm trying to get pptk.viewer() to send the X11 packets from a docker image to my X server running elsewhere. There are no permissions issues with the port. I've been doing this forever with matplotlib. In fact, I tested plotting just now with plt.plot([1, 2, 3, 4, 5]) and then plt.show() and it works perfectly. But pptk.viewer() doesn't. Even with the libz.so.1 fix everyone's talking about.

mathemaphysics avatar May 05 '21 17:05 mathemaphysics

Thanks

sjtusmartboy avatar Jul 09 '21 10:07 sjtusmartboy

Many thanks

Nacriema avatar Jul 12 '21 11:07 Nacriema

i try it and python2 is ok but python3.6 do not work

zhaobo0564 avatar Sep 27 '21 12:09 zhaobo0564

Has anyone found a solution for this? I'm trying to use pptk in a docker container. I've tried creating a symlink as suggested but its not working.

ssteele-kraken avatar Sep 27 '21 20:09 ssteele-kraken

I am using WSL2 with Ubuntu 20.04 LTS and after applying libz.so.1 fix, the viewer opens but shows a black/dark screen. Can anyone help me?

image

m-shahbaz-kharal avatar Jan 17 '22 23:01 m-shahbaz-kharal

2. sudo ln -s /lib/x86_64-linux-gnu/libz.so.1

This solution work for me. Make sure to do it with the correct python. It is for python 2.7. If you use another python for example python 3.6, you should adjust the instruction.

farhad-dalirani avatar Jul 17 '22 18:07 farhad-dalirani

I am using WSL2 with Ubuntu 20.04 LTS and after applying libz.so.1 fix, the viewer opens but shows a black/dark screen. Can anyone help me?

image

I have the same problem, have you solved the problem?

ronghuaiyang avatar Jan 08 '23 14:01 ronghuaiyang