google / closure-linter

Automatically exported from code.google.com/p/closure-linter
Apache License 2.0
109 stars 37 forks source link

peration not permitted: '/System/Library/Frameworks/Python.framework/Versions/2.7/bin/gflags2man.py' #109

Closed xvilo closed 1 year ago

xvilo commented 6 years ago

Unfortunately, installation on MacOS High Sierra fails. This is the output I received from the installer:

$ sudo pip install https://github.com/google/closure-linter/zipball/master 
Collecting https://github.com/google/closure-linter/zipball/master
  Downloading https://github.com/google/closure-linter/zipball/master (224kB)
    100% |████████████████████████████████| 225kB 1.2MB/s 
Collecting python-gflags (from closure-linter==2.3.19)
  Downloading python-gflags-3.1.2.tar.gz (52kB)
    100% |████████████████████████████████| 61kB 5.1MB/s 
matplotlib 1.3.1 requires nose, which is not installed.
matplotlib 1.3.1 requires tornado, which is not installed.
matplotlib 1.3.1 has requirement numpy>=1.5, but you'll have numpy 1.8.0rc1 which is incompatible.
Installing collected packages: python-gflags, closure-linter
  Running setup.py install for python-gflags ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/rj/r1nj_l7n60n58wkxfhx69fc40000gn/T/pip-install-eM5ixS/python-gflags/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/rj/r1nj_l7n60n58wkxfhx69fc40000gn/T/pip-record-AmelqQ/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib
    creating build/lib/gflags
    copying gflags/flag.py -> build/lib/gflags
    copying gflags/_helpers_test.py -> build/lib/gflags
    copying gflags/validators.py -> build/lib/gflags
    copying gflags/__init__.py -> build/lib/gflags
    copying gflags/flags_formatting_test.py -> build/lib/gflags
    copying gflags/flags_unicode_literals_test.py -> build/lib/gflags
    copying gflags/exceptions.py -> build/lib/gflags
    copying gflags/_helpers.py -> build/lib/gflags
    copying gflags/argument_parser.py -> build/lib/gflags
    copying gflags/flagvalues.py -> build/lib/gflags
    creating build/lib/gflags/third_party
    copying gflags/third_party/__init__.py -> build/lib/gflags/third_party
    creating build/lib/gflags/third_party/pep257
    copying gflags/third_party/pep257/__init__.py -> build/lib/gflags/third_party/pep257
    running install_lib
    running install_data
    copying gflags2man.py -> /System/Library/Frameworks/Python.framework/Versions/2.7/bin
    error: [Errno 1] Operation not permitted: '/System/Library/Frameworks/Python.framework/Versions/2.7/bin/gflags2man.py'

    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/rj/r1nj_l7n60n58wkxfhx69fc40000gn/T/pip-install-eM5ixS/python-gflags/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/rj/r1nj_l7n60n58wkxfhx69fc40000gn/T/pip-record-AmelqQ/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/rj/r1nj_l7n60n58wkxfhx69fc40000gn/T/pip-install-eM5ixS/python-gflags/

I hope somebody can help, or knows a workaround

rumpeltux commented 6 years ago

Hello, unfortunately I can’t help. Please note that the project is deprecated, see https://github.com/google/closure-linter/blob/master/README.md for alternatives.

maelcaldas commented 5 years ago

Hi,

I was able to workaround that by running it without sudo and adding the flag --user to install everything at home folder. In your example, it would be something like:

pip install https://github.com/google/closure-linter/zipball/master --user

Reference: http://marcelog.github.io/articles/mac_osx_python_pip_install_operation_not_permitted.html