python-pcl icon indicating copy to clipboard operation
python-pcl copied to clipboard

No module named pcl

Open kangkanbharadwaj opened this issue 10 years ago • 7 comments
trafficstars

hello, I have installed PCL1.6.0, pcl-1.6.0-pdb-msvc2010-win32, Primesense and openNI. I am not sure if I have to further configure PCL to work with Anaconda. I also tried copying the PCL folder in PCL1.6.0 in the site-package of the library folder of Anaconda, but it is still not working. The error I get when i try to execute a program importing "pcl" is :No module named pcl....

Can anyone kindly help or guide me towards the proper configuration...

kangkanbharadwaj avatar May 25 '15 12:05 kangkanbharadwaj

I am new to this, but what I found to make pcl import into python was to remove "._" from the "from ._pcl import *" line in init.py inside python-pcl before installing the setup.py.

pbach3 avatar Mar 28 '17 15:03 pbach3

In my case, after doing the $ pythonVERSION setup.py install, I modified the he __init__.py file from the installed site_packages/pcl location.

Respectively,

For Python 2.7: I modified the pcl/__init__.py to remove just the dot . from the from ._pcl import * line (as opposed to what @pbach3 indicated). I had to leave the underscore because the shared library generated by Cython is called _pcl.so and resides inside the pcl directory.

For Python 3.6: I did not have to edit anything from the __init__.py file , but I created a symbolic link such that

$ cd /usr/local/lib/python3.6/site-packages/pcl
$ ln -s _pcl.cpython-36m-darwin.so _pcl.so

This worked for me on 2017-04-21 under OS X using the Homebrew version of PCL 1.8.

ubuntuslave avatar Apr 21 '17 16:04 ubuntuslave

For Python 3, I can reproduce the error only if python's working directory is in python-pcl, in other directories import works without problems.

mys007 avatar Sep 07 '17 21:09 mys007

Try using this command to install pcl conda install -c sirokujira pcl

niranjanreddy891 avatar Mar 12 '18 10:03 niranjanreddy891

This command found no packages for pcl and boost. I used the following command, similar to how it was suggested here and it worked on win10, python 3.6.6

conda install -c sirokujira pcl --channel conda-forge

Now it found all required dependencies, but is not available when I do import pcl. So I ran after that

conda install -c sirokujira python-pcl --channel conda-forge

Now it runs. (It just seems like it does not feature mesh2pcl which I was looking for. But it runs.)

lucidBrot avatar Nov 01 '18 14:11 lucidBrot

I had to add C:\\Program Files\OpenNI2\Redist to the system PATH to get it to work under Windows.

wedesoft avatar Mar 01 '19 13:03 wedesoft

Latest Mac OS X: Issue: no module named ._pcl. Resolved with removing _ from init file. from pcl import * worked.

harishkashyap avatar Feb 08 '21 17:02 harishkashyap