-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: module 'pypcd' has no attribute 'PointCloud' #12
Comments
i have the same problem? did you address this problem? |
I have the same problem too. Anyone knows how to fix it? |
try using |
This solution didn't work here. Anyone else could help? edit: |
Use python 2 instead of python 3. If you use anaconda, create environment for python 2 if your default is on python 3. conda create -n env_name python=2.7 To enter your environment: Full tutorial about conda environment: This works for me. |
Iam using python3.6... Whether it works only for python2? |
How to make it to work for python3.6? Kindly help |
this PR makes it py3 compatible #9 |
Got the same issue, tried using |
Can you do this in your code?
And post what it prints |
2.7.12 (default, Nov 12 2018, 14:36:49) |
can you post your code and the error? |
Obviously test.pcd is in the same folder as the python script.
|
You have already imported everything with *, which means it will load all the functions of pypcd, if you want to keep it like that, the code should be:
or you can do like the following
|
I tried it of course, if I sent it it's because I tried every possible way of using PointCloud.
|
so both did not work? The first one should also work, I just tried it. See the following line from the log
Try the second one, and try the following
Maybe it's something to do with the installation. If you want to install from source, follow the installation procedure in Readme.md (remember to download data asset), otherwise you can install it via pip. |
Change
To
This problem could be resovled |
Edit Lib\site-packages\pypcd_init_.py could solve the problem
To
This error may be caused by the same name--'pypcd', of the module and source file. |
I am currently experiencing the same issue and none of the solutions below worked for me. I am using anaconda with python 3.7. |
You can try this one https://github.com/weidezhang/pypcd_python3.6/tree/ebd6096e9c0778e5cd159430b2ef7335b2e55660 |
"""https://blog.pollithy.com/python/numpy/pointcloud/tutorial-pypcd""" |
这个包不大,建议直接下载,然后大家也不要纠结究竟要import多少个pypcd,只要看看源码就明白了。Pointcloud类的位置在pypcd/pypcd/pypcd.py里面,大家找到这个位置,然后按照相对路径import即可。 是否python setup.py install都无所谓,install了,就import pypcd.pypcd.pypcd as pypcd(第一个是父文件夹pypcd,第二个是子文件夹pypcd,第三个是pypcd.py),然后就可以pypcd.Pointcloud了。 哪怕没有python setup.py install,直接把这个包下载到你的工程目录里,自己照着相对路径import即可。原理同上,重要的是在源码里找到你要调用的那个类或者那个函数的具体位置。 其他的类或者函数也是如此,作者在大部分py开头写了__all__列表,大家看看那个列表,里面有的,就代表可以import的,没有的八成是一些只在当前脚本内有用的函数,那个函数也没必要对外使用。上述方法python2或python3都可运行。 |
I had this issue too. For me, I was using the wrong Python interpreter. |
太感谢了!靠这个方法终于解决了!!! |
反正pcd是十进制的,还是自己写个pcd格式点云的读取识别类吧,不然再过几年pypcd包装不了了或者作者不更新了,然后pcd格式的标准又变了就好玩了。
…---Original---
From: ***@***.***>
Date: Tue, Apr 23, 2024 13:35 PM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [dimatura/pypcd] AttributeError: module 'pypcd' has no attribute'PointCloud' (#12)
这个包不大,建议直接下载,然后大家也不要纠结究竟要import多少个pypcd,只要看看源码就明白了。Pointcloud类的位置在pypcd/pypcd/pypcd.py里面,大家找到这个位置,然后按照相对路径import即可。
是否python setup.py install都无所谓,install了,就import pypcd.pypcd.pypcd as pypcd(第一个是父文件夹pypcd,第二个是子文件夹pypcd,第三个是pypcd.py),然后就可以pypcd.Pointcloud了。
哪怕没有python setup.py install,直接把这个包下载到你的工程目录里,自己照着相对路径import即可。原理同上,重要的是在源码里找到你要调用的那个类或者那个函数的具体位置。
其他的类或者函数也是如此,作者在大部分py开头写了__all__列表,大家看看那个列表,里面有的,就代表可以import的,没有的八成是一些只在当前脚本内有用的函数,那个函数也没必要对外使用。上述方法python2或python3都可运行。
太感谢了!靠这个方法终于解决了!!!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
The text was updated successfully, but these errors were encountered: