python-3.xpoint-cloudspdallas

How to install python pdal on Mac?


I'm installing python pdal on my new Mac. This Mac runs python 3.6 and anaconda has been already installed. While trying to install pdal using command line "pip install pdal" which is recommanded by pdal documentation, I got error msg: No such file or directory: 'pdal-config': 'pdal-config'

Then I'm trying to build a new environment in Anaconda and download pdal, which is suggested by a forum user. So I used command "conda create -n pdalenv -c conda-forge python-pdal". Everything goes well and pdal can be imported in Jupyter notebook. However, I got error msg when using pdal to process a LAS file: RuntimeError: filters.smrf: No returns to process.

In fact, I have another old computer which installed pdal correctly and no error occurs when I run my python code.

I've seen someone else suggests to use brew install to deal with it, but I haven't tried that yet. I don't wanna make my computer environment a mess.

So I just wait here to see if someone has a good idea dealing with it. Or could someone tell me how to do it correctly? The python code is:

pip = json.dumps(
{
"pipeline": [
"../data/p2.las",
{
  "type":"filters.smrf"
},
{
  "type":"filters.hag"
},
{   "type":"filters.eigenvalues",
        "knn":16},
{   "type":"filters.normal",
        "knn":16}
]})        
pipeline = pdal.Pipeline(pip)
pipeline.validate()
p = pipeline.execute()

Solution

  • Finally, I solved my problem by cloning the old Mac to my new Mac. Anyway, I can work on my new Mac and PDAL package can be imported and is working smoothly.

    Thanks all who viewing my question and responding to it.

    Best, YUN ZHAO