Problem installing MySQL-Python on Mac OS 10.14.1












1















I recently upgraded to Mac OS Mojave and now can't install MySQL-Python:



pip install MySQL-Python

...
clang -bundle -undefined dynamic_lookup build/temp.macosx-10.13-x86_64-2.7/_mysql.o -L/usr/local/opt/mysql-client/lib -lmysqlclient -lssl -lcrypto -o build/lib.macosx-10.13-x86_64-2.7/_mysql.so
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang' failed with exit status 1


The stack trace says that the "ssl" library wasn't found. I'm not sure what that means though as I have the latest XCode and OpenSSL is installed. Any advice appreciated.










share|improve this question



























    1















    I recently upgraded to Mac OS Mojave and now can't install MySQL-Python:



    pip install MySQL-Python

    ...
    clang -bundle -undefined dynamic_lookup build/temp.macosx-10.13-x86_64-2.7/_mysql.o -L/usr/local/opt/mysql-client/lib -lmysqlclient -lssl -lcrypto -o build/lib.macosx-10.13-x86_64-2.7/_mysql.so
    ld: library not found for -lssl
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    error: command 'clang' failed with exit status 1


    The stack trace says that the "ssl" library wasn't found. I'm not sure what that means though as I have the latest XCode and OpenSSL is installed. Any advice appreciated.










    share|improve this question

























      1












      1








      1








      I recently upgraded to Mac OS Mojave and now can't install MySQL-Python:



      pip install MySQL-Python

      ...
      clang -bundle -undefined dynamic_lookup build/temp.macosx-10.13-x86_64-2.7/_mysql.o -L/usr/local/opt/mysql-client/lib -lmysqlclient -lssl -lcrypto -o build/lib.macosx-10.13-x86_64-2.7/_mysql.so
      ld: library not found for -lssl
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      error: command 'clang' failed with exit status 1


      The stack trace says that the "ssl" library wasn't found. I'm not sure what that means though as I have the latest XCode and OpenSSL is installed. Any advice appreciated.










      share|improve this question














      I recently upgraded to Mac OS Mojave and now can't install MySQL-Python:



      pip install MySQL-Python

      ...
      clang -bundle -undefined dynamic_lookup build/temp.macosx-10.13-x86_64-2.7/_mysql.o -L/usr/local/opt/mysql-client/lib -lmysqlclient -lssl -lcrypto -o build/lib.macosx-10.13-x86_64-2.7/_mysql.so
      ld: library not found for -lssl
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      error: command 'clang' failed with exit status 1


      The stack trace says that the "ssl" library wasn't found. I'm not sure what that means though as I have the latest XCode and OpenSSL is installed. Any advice appreciated.







      pip mysql-python macos-mojave






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 24 '18 at 22:26









      elieli

      85651325




      85651325
























          1 Answer
          1






          active

          oldest

          votes


















          1














          I had the same issue on MacOS 10.14, and I was able to solve it using these steps:



          Change permissions for /usr/local to allow Homebrew to create links:



          sudo chown -R $(whoami) $(brew --prefix)/*


          Re-install openssl now that permissions have been fixed:



          brew reinstall openssl


          Run these two commands to allow compilers to find openssl:



          export LDFLAGS="-L/usr/local/opt/openssl/lib"
          export CPPFLAGS="-I/usr/local/opt/openssl/include"


          Then, try again to install MySQL-Python:



          pip install MySQL-Python





          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%2f53462886%2fproblem-installing-mysql-python-on-mac-os-10-14-1%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            I had the same issue on MacOS 10.14, and I was able to solve it using these steps:



            Change permissions for /usr/local to allow Homebrew to create links:



            sudo chown -R $(whoami) $(brew --prefix)/*


            Re-install openssl now that permissions have been fixed:



            brew reinstall openssl


            Run these two commands to allow compilers to find openssl:



            export LDFLAGS="-L/usr/local/opt/openssl/lib"
            export CPPFLAGS="-I/usr/local/opt/openssl/include"


            Then, try again to install MySQL-Python:



            pip install MySQL-Python





            share|improve this answer




























              1














              I had the same issue on MacOS 10.14, and I was able to solve it using these steps:



              Change permissions for /usr/local to allow Homebrew to create links:



              sudo chown -R $(whoami) $(brew --prefix)/*


              Re-install openssl now that permissions have been fixed:



              brew reinstall openssl


              Run these two commands to allow compilers to find openssl:



              export LDFLAGS="-L/usr/local/opt/openssl/lib"
              export CPPFLAGS="-I/usr/local/opt/openssl/include"


              Then, try again to install MySQL-Python:



              pip install MySQL-Python





              share|improve this answer


























                1












                1








                1







                I had the same issue on MacOS 10.14, and I was able to solve it using these steps:



                Change permissions for /usr/local to allow Homebrew to create links:



                sudo chown -R $(whoami) $(brew --prefix)/*


                Re-install openssl now that permissions have been fixed:



                brew reinstall openssl


                Run these two commands to allow compilers to find openssl:



                export LDFLAGS="-L/usr/local/opt/openssl/lib"
                export CPPFLAGS="-I/usr/local/opt/openssl/include"


                Then, try again to install MySQL-Python:



                pip install MySQL-Python





                share|improve this answer













                I had the same issue on MacOS 10.14, and I was able to solve it using these steps:



                Change permissions for /usr/local to allow Homebrew to create links:



                sudo chown -R $(whoami) $(brew --prefix)/*


                Re-install openssl now that permissions have been fixed:



                brew reinstall openssl


                Run these two commands to allow compilers to find openssl:



                export LDFLAGS="-L/usr/local/opt/openssl/lib"
                export CPPFLAGS="-I/usr/local/opt/openssl/include"


                Then, try again to install MySQL-Python:



                pip install MySQL-Python






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Dec 12 '18 at 22:47









                user5194377user5194377

                285




                285






























                    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%2f53462886%2fproblem-installing-mysql-python-on-mac-os-10-14-1%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







                    Popular posts from this blog

                    Futebolista

                    Lallio

                    Jornalista