How to install python pdal on Mac?

Multi tool use
Multi tool use












1















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()









share|improve this question























  • Could you post the output from conda info and conda list? That will help to provide an answer to the conda attempt.

    – chambbj
    Jan 1 at 16:58
















1















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()









share|improve this question























  • Could you post the output from conda info and conda list? That will help to provide an answer to the conda attempt.

    – chambbj
    Jan 1 at 16:58














1












1








1








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()









share|improve this question














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()






python-3.x point-clouds pdal las






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 1 at 5:04









Yun ZhaoYun Zhao

317




317













  • Could you post the output from conda info and conda list? That will help to provide an answer to the conda attempt.

    – chambbj
    Jan 1 at 16:58



















  • Could you post the output from conda info and conda list? That will help to provide an answer to the conda attempt.

    – chambbj
    Jan 1 at 16:58

















Could you post the output from conda info and conda list? That will help to provide an answer to the conda attempt.

– chambbj
Jan 1 at 16:58





Could you post the output from conda info and conda list? That will help to provide an answer to the conda attempt.

– chambbj
Jan 1 at 16:58












2 Answers
2






active

oldest

votes


















0














You should take a look at the return information in your input point cloud. The default behavior of SMRF is to process last-of-many (ReturnNumber == NumberOfReturns > 1) and only (NumberOfReturns == 1) returns. If it finds no points meeting these criteria, then it has nothing to process.



You could pass "returns":"first,last,intermediate,only" as an additional option on the filters.smrf stage to instruct it to process all of the points.






share|improve this answer
























  • Yes, I've considered this issue already. But it looks strange since my old computer can work smoothly and the new mac has nothing to return, with the same input las data and the same python program.

    – Yun Zhao
    Jan 2 at 3:07











  • I suspect you are running different versions of PDAL between the two instances. If you could provide further detail (e.g., pdal --version, conda list) for the working and non-working instances, it could help us to troubleshoot further.

    – chambbj
    Jan 3 at 13:44



















0














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






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53993116%2fhow-to-install-python-pdal-on-mac%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    You should take a look at the return information in your input point cloud. The default behavior of SMRF is to process last-of-many (ReturnNumber == NumberOfReturns > 1) and only (NumberOfReturns == 1) returns. If it finds no points meeting these criteria, then it has nothing to process.



    You could pass "returns":"first,last,intermediate,only" as an additional option on the filters.smrf stage to instruct it to process all of the points.






    share|improve this answer
























    • Yes, I've considered this issue already. But it looks strange since my old computer can work smoothly and the new mac has nothing to return, with the same input las data and the same python program.

      – Yun Zhao
      Jan 2 at 3:07











    • I suspect you are running different versions of PDAL between the two instances. If you could provide further detail (e.g., pdal --version, conda list) for the working and non-working instances, it could help us to troubleshoot further.

      – chambbj
      Jan 3 at 13:44
















    0














    You should take a look at the return information in your input point cloud. The default behavior of SMRF is to process last-of-many (ReturnNumber == NumberOfReturns > 1) and only (NumberOfReturns == 1) returns. If it finds no points meeting these criteria, then it has nothing to process.



    You could pass "returns":"first,last,intermediate,only" as an additional option on the filters.smrf stage to instruct it to process all of the points.






    share|improve this answer
























    • Yes, I've considered this issue already. But it looks strange since my old computer can work smoothly and the new mac has nothing to return, with the same input las data and the same python program.

      – Yun Zhao
      Jan 2 at 3:07











    • I suspect you are running different versions of PDAL between the two instances. If you could provide further detail (e.g., pdal --version, conda list) for the working and non-working instances, it could help us to troubleshoot further.

      – chambbj
      Jan 3 at 13:44














    0












    0








    0







    You should take a look at the return information in your input point cloud. The default behavior of SMRF is to process last-of-many (ReturnNumber == NumberOfReturns > 1) and only (NumberOfReturns == 1) returns. If it finds no points meeting these criteria, then it has nothing to process.



    You could pass "returns":"first,last,intermediate,only" as an additional option on the filters.smrf stage to instruct it to process all of the points.






    share|improve this answer













    You should take a look at the return information in your input point cloud. The default behavior of SMRF is to process last-of-many (ReturnNumber == NumberOfReturns > 1) and only (NumberOfReturns == 1) returns. If it finds no points meeting these criteria, then it has nothing to process.



    You could pass "returns":"first,last,intermediate,only" as an additional option on the filters.smrf stage to instruct it to process all of the points.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jan 2 at 0:54









    chambbjchambbj

    1034




    1034













    • Yes, I've considered this issue already. But it looks strange since my old computer can work smoothly and the new mac has nothing to return, with the same input las data and the same python program.

      – Yun Zhao
      Jan 2 at 3:07











    • I suspect you are running different versions of PDAL between the two instances. If you could provide further detail (e.g., pdal --version, conda list) for the working and non-working instances, it could help us to troubleshoot further.

      – chambbj
      Jan 3 at 13:44



















    • Yes, I've considered this issue already. But it looks strange since my old computer can work smoothly and the new mac has nothing to return, with the same input las data and the same python program.

      – Yun Zhao
      Jan 2 at 3:07











    • I suspect you are running different versions of PDAL between the two instances. If you could provide further detail (e.g., pdal --version, conda list) for the working and non-working instances, it could help us to troubleshoot further.

      – chambbj
      Jan 3 at 13:44

















    Yes, I've considered this issue already. But it looks strange since my old computer can work smoothly and the new mac has nothing to return, with the same input las data and the same python program.

    – Yun Zhao
    Jan 2 at 3:07





    Yes, I've considered this issue already. But it looks strange since my old computer can work smoothly and the new mac has nothing to return, with the same input las data and the same python program.

    – Yun Zhao
    Jan 2 at 3:07













    I suspect you are running different versions of PDAL between the two instances. If you could provide further detail (e.g., pdal --version, conda list) for the working and non-working instances, it could help us to troubleshoot further.

    – chambbj
    Jan 3 at 13:44





    I suspect you are running different versions of PDAL between the two instances. If you could provide further detail (e.g., pdal --version, conda list) for the working and non-working instances, it could help us to troubleshoot further.

    – chambbj
    Jan 3 at 13:44













    0














    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






    share|improve this answer




























      0














      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






      share|improve this answer


























        0












        0








        0







        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






        share|improve this answer













        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







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 3 at 2:48









        Yun ZhaoYun Zhao

        317




        317






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53993116%2fhow-to-install-python-pdal-on-mac%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            7fgDlOiJ6,Flos5S F0H6bpa55Y80
            Hb5Ttc

            Popular posts from this blog

            Monofisismo

            Angular Downloading a file using contenturl with Basic Authentication

            Olmecas