pptk icon indicating copy to clipboard operation
pptk copied to clipboard

pptk.view() hangs without showing debug/info/error information

Open sedot42 opened this issue 6 years ago • 22 comments

Hi there, following the example, pptk.view() hangs without showing any information. How to reproduce:

import numpy as np
import pptk
x = np.random.rand(100, 3)
pptk.viewer(x)

I'm running pptk 0.1.0 installed via pip install --user pptk with Python 3.7.1 on an x64 Arch Linux machine.

sedot42 avatar Oct 25 '18 13:10 sedot42

Same problem here. I'm running Ubuntu 18.04 with numpy-1.14.4 and pptk-0.1.0. The program just desn't respond anymore after the call to pptk.viewer.

EDIT: The workaround in issue #3 works for me.

TSchattschneider avatar Nov 06 '18 12:11 TSchattschneider

Archlinux latest updates, happens as well.

rimio avatar Feb 24 '19 20:02 rimio

Hi,

is there any news regarding how to solve this problem?

Thanks

gabcav avatar Apr 04 '19 19:04 gabcav

I have this problem too. I tried to compile from the source but same result.

fguiotte avatar Apr 17 '19 13:04 fguiotte

same

Taktimakan avatar Aug 16 '19 18:08 Taktimakan

pptk freezes on archlinux because the viewer does not launch. the socket just wait for a connection forever.

QT_DEBUG_PLUGINS=1 /usr/lib/python3.7/site-packages/pptk/viewer 0

This command shows that libz.1.2.9 is required.

Fixed it by compiling libz.1.2.9 and make a symbolic link to /usr/lib/python3.7/site-packages/pptk/libs/libz.so.1

hope it helps

chabardt avatar Sep 12 '19 16:09 chabardt

@chabardt instructions solved the issue for me, for some reason I had the file /usr/lib/python3.7/site-packages/pptk/libs/libz.so.1 but it wasn't working properly, so I did a symlink from the "OS version" of the same file (/usr/lib/libz.so.1) and that solve the issue. (I had this issue using virtual env so I create the symlink inside the virutal env directory and it did work)

Commands: remove the old file rm ./venv/lib/python3.6/site-packages/pptk/libs/libz.so.1 create the synlink: ln -s /usr/lib/libz.so.1 ./venv/lib/python3.6/site-packages/pptk/libs/libz.so.1 (again I'm using virtual env, if you are using the OS paths, follow chabardt comment paths)

ivan-scale avatar Sep 26 '19 14:09 ivan-scale

This is still an issue as of today. I installed as instructions stated and am having pptk.view hang. Please fix

angussmitchell avatar May 17 '20 05:05 angussmitchell

I'm running into this on Ubuntu 18.04 LTS, as well.

hosford42 avatar Aug 06 '20 22:08 hosford42

@ivan-scale @TSchattschneider Thanks for your suggestions! Fixed my problem!

sumr4693 avatar Sep 04 '20 13:09 sumr4693

@ivan-scale Your solution worked like a charm, thanks mate!.

I use Anaconda (Ubuntu 18) so I linked it to /home/my_user/anaconda3/envs/my_env/lib/libz.so.1 instead of /usr/lib/libz.so.1

Pepo-Perez avatar May 20 '21 17:05 Pepo-Perez

Does anyone know how to solve this issue for Windows 10 and python 3.7?

bradylowe avatar May 29 '21 18:05 bradylowe

A version of the solution posted by @ivan-scale . Ubuntu 20.04 I could not find the libz.so.1 file under the given path /usr/lib/libz.so.1

I was using Anaconda and did a search and could come across the libz.so.1 in the anaconda environment I was using. The path is as below

/home/user/anaconda3/envs/{env - name }/lib/libz.so.1

I used the above file to form the symbolic link and that worked.

Hope this helps.

nissim-kurle avatar Jul 08 '21 13:07 nissim-kurle

Does anyone know how to solve this issue for Windows 10 and python 3.7?

I have the save problem in win10 +python3.7. But I solved it. It may be the problem of "Remote Desktop Connection" if you use it. Because OpenGL is NOT supported when openning "Remote Desktop Connection". IF you use "Remote Desktop Connection", just change another remote software. IF NOT, please check if driver in your remoted computer support OpenGL.

JinYue2015 avatar Jul 13 '21 09:07 JinYue2015

@chabardt instructions solved the issue for me, for some reason I had the file /usr/lib/python3.7/site-packages/pptk/libs/libz.so.1 but it wasn't working properly, so I did a symlink from the "OS version" of the same file (/usr/lib/libz.so.1) and that solve the issue. (I had this issue using virtual env so I create the symlink inside the virutal env directory and it did work)

Commands: remove the old file rm ./venv/lib/python3.6/site-packages/pptk/libs/libz.so.1 create the synlink: ln -s /usr/lib/libz.so.1 ./venv/lib/python3.6/site-packages/pptk/libs/libz.so.1 (again I'm using virtual env, if you are using the OS paths, follow chabardt comment paths)

This worked for Ubuntu 20.04

kotireddyallu avatar Aug 16 '21 21:08 kotireddyallu

For those who use anaconda environments: I used the following command.

ln -s /home/{user_name}/anaconda3/envs/{env_name}/lib/libz.so.1 /home/{user_name}/anaconda3/envs/{env_name}/lib/python3.7/site-packages/pptk/libs/libz.so.1

This works for Ubuntu 18.04

YoungWoong-Cho avatar Sep 23 '21 04:09 YoungWoong-Cho

I was trying to use inside docker container with ubuntu 18.04 image. This worked for me

$  rm /usr/local/lib/python3.6/dist-packages/pptk/libs/libz.so.1 
$  ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/local/lib/python3.6/dist-packages/pptk/libs/libz.so.1

azmathmoosa avatar Nov 25 '21 05:11 azmathmoosa

I work with Linux 18.04 and the solution was way easier. In the terminal I added the following line and it worked just fine: $ ...//lib/python3.6/site-packages/pptk/libs$ mv libz.so.1 libz.so.1.old I guess the problem is that there are two times the same library and then gets in conflict. By placing this one with a different name then the problem stops. I guess one could also remove it. Up to you.

ohramireza avatar Jan 13 '22 12:01 ohramireza

Actually, removing the libz.so.1 file and link with the correct file will solve the problem. In my case I'm using python3.6 and the file I needed to remove was in my .local folder (Ubuntu 18.04). Then, the correct file was in /lib/x86_64-linux-gnu. The commands I used were: rm /home/YourName/.local/lib/python3.6/site-packages/pptk/libs/libz.so.1 (remove the file which is giving problem) ln -s /lib/x86_64-linux-gnu/libz.so.1 /home/YourName/.local/lib/python3.6/site-packages/pptk/libs/libtbb.so.1 (create the synlink)

This issue should be closed.

pierreramiro avatar May 03 '22 16:05 pierreramiro

For those who use anaconda environments: I used the following command.

ln -s /home/{user_name}/anaconda3/envs/{env_name}/lib/libz.so.1 /home/{user_name}/anaconda3/envs/{env_name}/lib/python3.7/site-packages/pptk/libs/libz.so.1

This works for Ubuntu 18.04

Remove the libz.so.1 file from /python3.7/site-packages/pptk/libs/ before symlinking. Works for Ubuntu 22.04 as well.

alvisxp avatar Mar 22 '23 12:03 alvisxp

You can use to see which libz is being used: inotifywait -m $(find <PATH> -iname "libz.so*" 2>/dev/null) -e access

You can map a whole drive, or just place where you have envs. Actually libz is being loaded right after opening jupyter.

Leave inotifywait opened before running script/opening jupyter, so you can see for example:

/home/mariusz/miniconda3/envs/ds/lib/python3.8/site-packages/pptk/libs/libz.so ACCESS

Companieero avatar Mar 31 '23 12:03 Companieero