Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to fix SimpleQueue error when importing the Laspy module in Python?

When importing Laspy I get the following error:

import laspy as lp

ImportError: cannot import name ‘SimpleQueue’

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

The error occurs in the following line of the Laspy module:
from queue import Queue, SimpleQueue

I tried updating Python because it was likely to be a version issue, but this did not work. Then I tried updating Laspy, conda and lastly I updated everything. This did not work. I am using these versions:
python: 3.6.13
laspy: 2.3.0 (25/10/2022)

(I am working in Jupyter Notebook.)

How can I fix this error?

>Solution :

SimpleQueue is new in Python 3.7.

You’ll need to use Python 3.7 or newer to use laspy – and you should, anyway, since Python 3.6’s end-of-life was 1 year and 3 months ago (23 Dec 2021).

Alternately, you can downgrade laspy to a version that does support Python 3.6; according to this commit versions older than 2.2.0 should be compatible.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading