最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python - PCL import fails in code, but not in terminal (VS Code) - Stack Overflow

programmeradmin0浏览0评论

I want to import the PCL (Point Cloud Library). I am currently working in VS Code and my chosen Interpreter is Python 3.11.8, embedded in a conda environment. The PCL Version is 1.14.1. When I run the line import pcl in the code, it returns ModuleNotFoundError: No module named 'pcl'. If I run the exact same command in the VS Code terminal, it runs without issues. Same for the regular terminal and conda power shell. conda list pcl also returns the expected results, everything seems to work perfectly fine - until I want to import the PCL in my regular code. First, I thought the issue was caused by errors in the interpreter selection, so I included the sys library and added print(sys.executable), which returns C:\detectors\pcl_win\python.exe, which is the env's correct path. For further trouble shooting I imported numpy for some simple operations. It was found inside the environment without any irregularities, code runs smoothly.

First, I thought the issue was caused by errors in the interpreter selection, so I included the sys library and added print(sys.executable), which returns C:\detectors\pcl_win\python.exe, which is the env's correct path. For further trouble shooting I imported numpy for some simple operations. It was found inside the environment without any irregularities, code runs smoothly. I also checked the build, but it's working for other people around me.

Has anyone had the same or similar experiences, or ideas for further troubleshooting?

In the very beginning, I had issues with the pcl installation that turned out to be a bug, solved by a software update - I hope this time it's different.

This is the complete output in VS Code:

path is C:\detectors\pcl_win\python.exe Traceback (most recent call last): File "c:\detectors\harris3d\harris3d_keypointextraction.py", line 9, in import pcl ModuleNotFoundError: No module named 'pcl'

The terminal output for the sys-query is

path is C:\detectors\pcl_win\python.exe

发布评论

评论列表(0)

  1. 暂无评论