troubleshooting Question

Python Install On Mac Yosemite

Avatar of sharingsunshine
sharingsunshineFlag for United States of America asked on
PythonMac OS XScripting LanguagesApple OS
8 Comments1 Solution509 ViewsLast Modified:
I ran these commands to install pip - and this is the first time I have done anything with python



    Install easy_install

    curl https://bootstrap.pypa.io/ez_setup.py -o - | sudo python

    Install pip

    sudo easy_install pip


 and got this output

Installing collected packages: regex
  Running setup.py install for regex ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/vg/lzbgw_fx4k90zdjn3zy95qt80000gp/T/pip-build-S0yDgr/regex/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/vg/lzbgw_fx4k90zdjn3zy95qt80000gp/T/pip-ys9aKs-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.10-intel-2.7
    copying Python2/regex.py -> build/lib.macosx-10.10-intel-2.7
    copying Python2/_regex_core.py -> build/lib.macosx-10.10-intel-2.7
    copying Python2/test_regex.py -> build/lib.macosx-10.10-intel-2.7
    running build_ext
    building '_regex' extension
    creating build/temp.macosx-10.10-intel-2.7
    creating build/temp.macosx-10.10-intel-2.7/Python2
    cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c Python2/_regex.c -o build/temp.macosx-10.10-intel-2.7/Python2/_regex.o
    Python2/_regex.c:16675:77: warning: '&&' within '||' [-Wlogical-op-parentheses]
                                if (state->total_errors < error_limit || i == 0 &&
                                                                      ~~ ~~~~~~~^~
    Python2/_regex.c:16675:77: note: place parentheses around the '&&' expression to silence this warning
                                if (state->total_errors < error_limit || i == 0 &&
                                                                                ^
    Python2/_regex.c:16678:38: warning: variable 'better' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
                                else if (state->total_errors == error_limit)
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Python2/_regex.c:16686:33: note: uninitialized use occurs here
                                if (better) {
                                    ^~~~~~
    Python2/_regex.c:16678:34: note: remove the 'if' if its condition is always true
                                else if (state->total_errors == error_limit)
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Python2/_regex.c:16673:40: note: initialize the variable 'better' to silence this warning
                                BOOL better;
                                           ^
                                            = '\0'
    Python2/_regex.c:18708:28: warning: unused function 'match_get_group_dict' [-Wunused-function]
    Py_LOCAL_INLINE(PyObject*) match_get_group_dict(MatchObject* self) {
                               ^
    3 warnings generated.
    Python2/_regex.c:16675:77: warning: '&&' within '||' [-Wlogical-op-parentheses]
                                if (state->total_errors < error_limit || i == 0 &&
                                                                      ~~ ~~~~~~~^~
    Python2/_regex.c:16675:77: note: place parentheses around the '&&' expression to silence this warning
                                if (state->total_errors < error_limit || i == 0 &&
                                                                                ^
    Python2/_regex.c:16678:38: warning: variable 'better' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
                                else if (state->total_errors == error_limit)
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Python2/_regex.c:16686:33: note: uninitialized use occurs here
                                if (better) {
                                    ^~~~~~
    Python2/_regex.c:16678:34: note: remove the 'if' if its condition is always true
                                else if (state->total_errors == error_limit)
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Python2/_regex.c:16673:40: note: initialize the variable 'better' to silence this warning
                                BOOL better;
                                           ^
                                            = '\0'
    Python2/_regex.c:18708:28: warning: unused function 'match_get_group_dict' [-Wunused-function]
    Py_LOCAL_INLINE(PyObject*) match_get_group_dict(MatchObject* self) {
                               ^
    3 warnings generated.
    cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c Python2/_regex_unicode.c -o build/temp.macosx-10.10-intel-2.7/Python2/_regex_unicode.o
    cc -bundle -undefined dynamic_lookup -arch x86_64 -arch i386 -Wl,-F. build/temp.macosx-10.10-intel-2.7/Python2/_regex.o build/temp.macosx-10.10-intel-2.7/Python2/_regex_unicode.o -o build/lib.macosx-10.10-intel-2.7/_regex.so
    running install_lib
    copying build/lib.macosx-10.10-intel-2.7/_regex.so -> /Library/Python/2.7/site-packages
    error: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/_regex.so'
    
    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/vg/lzbgw_fx4k90zdjn3zy95qt80000gp/T/pip-build-S0yDgr/regex/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/vg/lzbgw_fx4k90zdjn3zy95qt80000gp/T/pip-ys9aKs-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/vg/lzbgw_fx4k90zdjn3zy95qt80000gp/T/pip-build-S0yDgr/regex/

I need to use python to change several blogger posts using this logic
http://www.tulane.edu/%7Ehoward/CompCultEN/webpages.html
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros