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

Windows Setup.py Install Error

Open derektrc opened this issue 10 years ago • 24 comments

After installing PCL 1.6.0 on WIndows, I have downloaded python-pcl into a folder.

After I type python setup.py install I get the following error:

pcl_error

Has anyone found a way to fix this?

I originally thought it was a path error, but I double checked the installation and saw these included in my path:

C:\Program Files\OpenNI\Bin64;C:\Program Files\OpenNI\Bin64;C:\Program Files\PCL 1.6.0\bin

derektrc avatar Jan 05 '15 05:01 derektrc

I've never even considered this could work. Does pcl for windows ship a pkg-config binary and pkg config files?

You will probbably have to hand code the include and library paths (assuming you have the correct compiler and dev versions for pcl for windows)

nzjrs avatar Jan 05 '15 11:01 nzjrs

I'm not sure, but from this issue https://github.com/strawlab/python-pcl/issues/13, it seems like installing on windows is possible.

Edit: I just noticed he mentions "when installing python-pcl (with make)" so i'm guessing there's another way for installing python-pcl on Windows?

derektrc avatar Jan 07 '15 02:01 derektrc

do you have pkg-config in your path? does it find pcl libs?

nzjrs avatar Jan 07 '15 13:01 nzjrs

I just noticed the pcl_common-1.6.pc file in my "C:\Program Files\PCL 1.6.0\lib\pkgconfig" folder and I added it to path, however the same issue is still coming up.

derektrc avatar Jan 07 '15 18:01 derektrc

After following http://stackoverflow.com/questions/1710922/how-to-install-pkg-config-in-windows, I installed pkg-config on windows. I am now getting this error so I will look into how to add PCL to pkg-config capture

derektrc avatar Jan 07 '15 22:01 derektrc

Any solution to this problem ?, I'm interested too

mamineayari avatar Jan 16 '15 10:01 mamineayari

After a quick look, you have to add your PCL pkg files folder "C:\Program Files\PCL 1.6.0\lib\pkgconfig" to PKG_CONFIG_PATH environment variable. It should compile then.

mamineayari avatar Jan 16 '15 10:01 mamineayari

I believe my Python is using Mingw as a compiler so after I installed pkg-config I within the gcc string I realized that it kept searching in the "C:\Python27\PC" (note: PC folder). I am not sure why but I just copy and pasted all of my libraries into that folder and it started compiling. However right now more errors are coming up capture

I have not yet figured out specifically how to solve the "invalid access to non-static data member" errors yet but I believe it's because there's a file not being included in the path correctly. :

derektrc avatar Jan 16 '15 19:01 derektrc

I'm compiling with python2.7, msvc11 x64 (2012) and PCL 1.8 and the compilation went well. I use this command: python setup.py config --compiler=msvc build --compiler=msvc install, by default python will look for msvc9 to compile the code but you can force it to compile with msvc11, in the python script msvc9compiler.py (somewhere in Anaconda directory) in the function "find_vcvarsall" you have to comment the code block where python look in the registry to look for msvc9 binaries so that we can set the path to the binaries by ourselves. Then, in command line, do: SET VS90COMNTOOLS=%VS110COMNTOOLS% and python setup.py config --compiler=msvc build --compiler=msvc install. You can change setup.py to include the missing directories for PCL, Boost, Eigen or Openni2 using: ext_args['include_dirs'].append("put include dirs here") , or adding library directories using: ext_args['library_dirs'].append("put librararies directory here"). I had some boost linking errors that I solved by adding ext_args['extra_compile_args'].append("/EHsc") in setup.py. Hope this helps, cheers

mamineayari avatar Jan 21 '15 14:01 mamineayari

@aminm2a, did you have success running python-pcl? I managed to compile it correctly using VS 2008 (using your suggestions) but almost all tests I try to run give a segmentation fault.

ccordoba12 avatar Aug 12 '15 16:08 ccordoba12

Is there anymore advice on this issue?

gannj001 avatar Sep 04 '15 09:09 gannj001

I have success compiling python-pcl on Windows for Python 2 (i.e. using Visual Studio 2008), but unfortunately it segfaults on almost all tests.

ccordoba12 avatar Sep 04 '15 15:09 ccordoba12

How did you fix the 'cannot find PCL error' during installation process? I can't figure out which files or directories to append to setup.py.

I compiled PCL from source and everything works fine but I still can't install python-pcl.

NatholBMX avatar Feb 05 '17 09:02 NatholBMX

I used conda and conda-build. They take care of setting up PATH correctly.

ccordoba12 avatar Feb 06 '17 00:02 ccordoba12

I use python setup.py install but failed with the following error:

C:\Users\403-svip\Desktop\python-pcl-master\python-pcl-master>python setup.py in stall Traceback (most recent call last): File "setup.py", line 19, in if subprocess.call(['pkg-config', 'pcl_common%s' % pcl_version]) == 0: File "D:\Python27\lib\subprocess.py", line 522, in call return Popen(*popenargs, **kwargs).wait() File "D:\Python27\lib\subprocess.py", line 710, in init errread, errwrite) File "D:\Python27\lib\subprocess.py", line 958, in _execute_child startupinfo) WindowsError: [Error 2]

did you solve this issue ?

Haofun123 avatar Aug 13 '17 02:08 Haofun123

Download Gtk + for Windows before calling setup.py and copy the extracted binary to the pkg-config folder.

Sirokujira avatar Oct 03 '17 07:10 Sirokujira

Error while installing pcl

This is the error I am facing. Kindly solve this issue

niranjanreddy891 avatar Feb 13 '18 10:02 niranjanreddy891

Just want to ask where those extracted binary are located? There are too many files and directories in the GTK+(msys64) folder. Thx.

My problem is like this:

C:~python\python-pcl-master>python setup.py install

cannot find environment PKG_CONFIG_PATH set environment PKG_CONFIG_PATH=C:\Program Files\PCL 1.8.1\lib\pkgconfig;C:\Prog ram Files\PCL 1.8.1\3rdParty\FLANN\lib\pkgconfig;C:\Program Files\PCL 1.8.1\3rdP arty\Eigen\lib\pkgconfig; F:\deep_learning\python\python-pcl-master\pkg-config\pkg-config.exe Traceback (most recent call last): File "setup.py", line 153, in if subprocess.call(['.\pkg-config\pkg-config.exe', 'pcl_common%s' % pcl_ve rsion]) == 0: File "C:\Anaconda3\lib\subprocess.py", line 267, in call with Popen(*popenargs, **kwargs) as p: File "C:\Anaconda3\lib\subprocess.py", line 709, in init restore_signals, start_new_session) File "C:\Anaconda3\lib\subprocess.py", line 997, in _execute_child startupinfo) FileNotFoundError: [WinError 2] 系统找不到指定的文件。

peterwa88 avatar Feb 19 '18 14:02 peterwa88

Can anyone please tell me how to set the path. I am little bit confused. `(base) E:>cd E:\Anaconda\pcl-package\pcl-1.8.1

(base) E:\Anaconda\pcl-package\pcl-1.8.1>python setup.py build_ext -i set environment PKG_CONFIG_PATH=PCL_ROOT=$(E:\Anaconda\pcl-package\pcl-1.8.1 E:\Anaconda\pcl-package\pcl-1.8.1\pkg-config\pkg-config.exe Traceback (most recent call last): File "setup.py", line 153, in if subprocess.call(['.\pkg-config\pkg-config.exe', 'pcl_common%s' % pcl_ve rsion]) == 0: File "E:\Anaconda\installed\lib\subprocess.py", line 168, in call return Popen(*popenargs, **kwargs).wait() File "E:\Anaconda\installed\lib\subprocess.py", line 390, in init errread, errwrite) File "E:\Anaconda\installed\lib\subprocess.py", line 640, in _execute_child startupinfo) WindowsError: [Error 2] The system cannot find the file specified

(base) E:\Anaconda\pcl-package\pcl-1.8.1>`

Thanks in advance

niranjanreddy891 avatar Mar 23 '18 05:03 niranjanreddy891

Thanks, I solved my issue

niranjanreddy891 avatar Mar 29 '18 09:03 niranjanreddy891

I am facing the same problem how u solved the problem??

iamArunraj avatar Feb 12 '19 14:02 iamArunraj

I also have the same problem how to slove it ?

scizors avatar Apr 11 '19 08:04 scizors

to solve this problem for windows , follow this answer from stackoverflow: https://stackoverflow.com/a/22363820/9072735

Create pkg-config directory under the "C:\Program Files\PCL 1.8.1\lib\pkgconfig". Then, move pkg-config.exe, intl.dll and libglib-2.0-0.dll files to under the "C:\Program Files\PCL 1.8.1\lib\pkgconfig\pkgconfig"

Then, change ine 138 in setup.py file to pkgconfigPath = 'C:\\Program Files\\PCL 1.8.1\\lib\\pkgconfig\\pkgconfig\\pkg-config.exe'

Then, change line 152 in setup.py file to if subprocess.call([pkgconfigPath, 'pcl_common%s' % pcl_version]) == 0

Finally add environment variable as variable name: PKG_CONFIG_PATH variable value: C:\Program Files\PCL 1.8.1\lib\pkgconfig

now, you can run setup.py without any problems.

Bedrettin-Cetinkaya avatar May 15 '19 11:05 Bedrettin-Cetinkaya

Hello evryone, Please have you any idea about this issue Capture

Nada-hmd avatar Jul 09 '20 07:07 Nada-hmd