Opencv-pcl installation and ImportError: DLL load failed: The specified module cannot be found, and an error is reported

Required information:

python_pcl-0.3.1-cp36-cp36m-win_amd64.whl

Compressed package: pcl-1.12.1-pdb-msvc2019-win64

pcl program: PCL-1.12.1-AllInOne-msvc2019-win64

netdisc:

Link: https://pan.baidu.com/s/1vct8dWCIKI5CouMVhbO3kQ 
Extraction code: 1bec

 

PCD file used to verify the success of the installation:

562680880ade4f5bbd478da973eb05df.png

 

 

91d432bacf1a492d9ce74ec2490e1062.png

 

Step 1: Double-click the app to install it

8128f6272f9a4e599d3c1a1d5b1a4611.png

 

Step 2: Add environment variables (a folder will be automatically generated where the software is installed)

b7a52d8a69004cb6a4fb21813051e174.png

 

640b0094e8ce4abf9e429b33b59abd61.png

 third step:

Unzip pcl-1.12.1-pdb-msvc2019-win64.zip , and copy all the decompressed files to C:\Program Files\PCL 1.12.1\bin

the fourth step:

Find this, double click to install

2d46d776c6274ee5b086d981d156234d.png

 52f11c08584446289058a7822abb0beb.png

Case 1: If you have installed it before, click remove, and then re-run the OpenNI-Windows-x64-2.2.msi file to install it.

87ab5a95b024499d8789107003fabe1b.png

Case 2: If you haven't installed it before, just install it directly.

Special Note: The installation path is set in C:\Program Files\PCL 1.12.1\3rdParty\OpenNI2. (in the same directory as the OpenNI-Windows-x64-2.2.msi file)

553f99cb80d94882ad4d7e5dc4ff25e5.png

Step 5: Download python_pcl-0.3.1-cp36-cp36m-win_amd64.whl.

Enter the activate virtual environment, enter the folder where this file is located, and perform the installation command:

pip install python_pcl-0.3.1-cp36-cp36m-win_amd64.whl
 

 

 

Finally: Error ImportError: DLL load failed: The specified module could not be found.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\Anaconda3\envs\python36\lib\site-packages\pcl\__init__.py", line 5, in <module>
    from ._pcl import *
ImportError: DLL load failed: The specified module could not be found.

pcl depends on OpenNI2.dll, find OpenNI2.dll in D:\OpenNI2\Samples\Bin

Copy it to D:\Anaconda3\envs\python36\Lib\site-packages\pcl, try again and it will work

 Check: Is pcl installed successfully?

import pcl
import numpy as np
import pcl.pcl_visualization

if __name__ == "__main__":
    points = pcl.load_XYZRGB('rabbit.pcd')

    viewer = pcl.pcl_visualization.CloudViewing()
    viewer.ShowColorCloud(points, b'cloud')

    v = True
    while v:
        v = not (viewer.WasStopped())

bd7b0f04ca73493cb50e3b932ddb4246.png

 

 

 

Guess you like

Origin blog.csdn.net/qq_53545309/article/details/128694063