Skip to content
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

Python 3 support #7

Open
Ylannl opened this issue Aug 9, 2016 · 10 comments
Open

Python 3 support #7

Ylannl opened this issue Aug 9, 2016 · 10 comments

Comments

@Ylannl
Copy link

Ylannl commented Aug 9, 2016

It would be great if this module worked with Python 3. Currently it does not properly import.

I briefly looked into it and it looks like the python-lzf module (not Python 3 compatible) could be the culprit. However, Python 3 appears to have this functionality built-in.

@David-Estevez
Copy link

Same thing here, in my case the error is the following:

/usr/local/lib/python3.4/dist-packages/pypcd/pypcd.py in <module>()
     11 import struct
     12 import copy
---> 13 import cStringIO as sio
     14 import numpy as np
     15 import warnings

ImportError: No module named 'cStringIO'

Which it seems to be removed from Python 3 in favor of io: http://stackoverflow.com/questions/28200366/python-3-4-0-email-package-install-importerror-no-module-named-cstringio

@dimatura Do you have any plans on supporting Python 3? Would you be interested in in help or even a pull request adding support to Python 3?

@klintan
Copy link

klintan commented Feb 2, 2018

I got all tests passing for Python 3, this PR #9 , needed to change a bunch of things but I think it should be working now.

@dimatura
Copy link
Owner

I don't use python 3 personally, yet. Some day. I'll check out @klintan's PR. Ideally it would work on both.

@maierd
Copy link

maierd commented Jul 23, 2018

@dimatura are you considering to merge @klintan's pull request?
Seems to work fine under Python 3.

@dongqiaqia
Copy link

dongqiaqia commented Mar 10, 2020

python3.6 centos6
pypcd runs successfully.
1、 Reference to #28 ,You can install it with pip using pip3 install --upgrade git+https://github.com/klintan/pypcd.git .
2、use pypcd as follow:
from pypcd import pypcd
points_pcd = pypcd.PointCloud.from_path(lidar_path)
x = points_pcd.pc_data["x"]
y = points_pcd.pc_data["y"]
z = points_pcd.pc_data["z"]

@SBCV
Copy link

SBCV commented Sep 27, 2020

Another option would be to use the pyntcloud library - which also supports pcd files and is still actively maintained

@jingyibo123
Copy link

Another option would be to use the pyntcloud library - which also supports pcd files and is still actively maintained

They refuse to support the lzf compressed .pcd format,
I think pypcd is the only python library that supports binary-compressed pcd format.

@SBCV
Copy link

SBCV commented Dec 16, 2022

What do you mean with "refuse"? In my experience the maintainer (daavoo) is very cooperative - so far, all my PR's have been merged.

@jacoblambert
Copy link

Just wanted to point out pypcd4 is another alternative for python3, building on @dimatura great work.

@jingyibo123
Copy link

What do you mean with "refuse"? In my experience the maintainer (daavoo) is very cooperative - so far, all my PR's have been merged.

Apologies for the bold wording.. I was probably intimidated by this msg, I suppose a PR for lzf support could be eventually merged but I gave up on legacy pcd files...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants