Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation failure on Mac OS 10.12.4 #582

Closed
jonhadfield opened this issue May 7, 2017 · 7 comments
Closed

Installation failure on Mac OS 10.12.4 #582

jonhadfield opened this issue May 7, 2017 · 7 comments

Comments

@jonhadfield
Copy link

Installation failed for me until I upgraded the cryptography package and dependencies.
Not had time to determine minimum version of which component(s) etc., or if it's a one-off due to my setup, but hope this helps towards a possible patch.

Collecting locustio
  Downloading locustio-0.7.5.tar.gz (89kB)
    100% |████████████████████████████████| 92kB 2.8MB/s
Collecting gevent==1.1.1 (from locustio)
  Downloading gevent-1.1.1.tar.gz (2.0MB)
    100% |████████████████████████████████| 2.0MB 551kB/s
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/tmp/pip-build-5fGIqs/gevent/setup.py", line 516, in <module>
        run_setup(ext_modules, run_make=run_make)
      File "/private/tmp/pip-build-5fGIqs/gevent/setup.py", line 502, in run_setup
        **setup_kwds
      File "/Users/hadfielj/.pyenv/versions/2.7.12/lib/python2.7/distutils/core.py", line 111, in setup
        _setup_distribution = dist = klass(attrs)
      File "/Users/hadfielj/.pyenv/versions/2.7.12/lib/python2.7/site-packages/setuptools/dist.py", line 321, in __init__
        _Distribution.__init__(self, attrs)
      File "/Users/hadfielj/.pyenv/versions/2.7.12/lib/python2.7/distutils/dist.py", line 287, in __init__
        self.finalize_options()
      File "/Users/hadfielj/.pyenv/versions/2.7.12/lib/python2.7/site-packages/setuptools/dist.py", line 388, in finalize_options
        ep.load()(self, ep.name, value)
      File "/Users/hadfielj/.pyenv/versions/2.7.12/lib/python2.7/site-packages/cffi/setuptools_ext.py", line 187, in cffi_modules
        add_cffi_module(dist, cffi_module)
      File "/Users/hadfielj/.pyenv/versions/2.7.12/lib/python2.7/site-packages/cffi/setuptools_ext.py", line 49, in add_cffi_module
        execfile(build_file_name, mod_vars)
      File "/Users/hadfielj/.pyenv/versions/2.7.12/lib/python2.7/site-packages/cffi/setuptools_ext.py", line 25, in execfile
        exec(code, glob, glob)
      File "gevent/_corecffi_build.py", line 330, in <module>
        ffi.cdef(_cdef)
      File "/Users/hadfielj/.pyenv/versions/2.7.12/lib/python2.7/site-packages/cffi/api.py", line 105, in cdef
        self._cdef(csource, override=override, packed=packed)
      File "/Users/hadfielj/.pyenv/versions/2.7.12/lib/python2.7/site-packages/cffi/api.py", line 119, in _cdef
        self._parser.parse(csource, override=override, **options)
      File "/Users/hadfielj/.pyenv/versions/2.7.12/lib/python2.7/site-packages/cffi/cparser.py", line 299, in parse
        self._internal_parse(csource)
      File "/Users/hadfielj/.pyenv/versions/2.7.12/lib/python2.7/site-packages/cffi/cparser.py", line 304, in _internal_parse
        ast, macros, csource = self._parse(csource)
      File "/Users/hadfielj/.pyenv/versions/2.7.12/lib/python2.7/site-packages/cffi/cparser.py", line 262, in _parse
        self.convert_pycparser_error(e, csource)
      File "/Users/hadfielj/.pyenv/versions/2.7.12/lib/python2.7/site-packages/cffi/cparser.py", line 291, in convert_pycparser_error
        raise api.CDefError(msg)
    cffi.api.CDefError: cannot parse "__dotdotdot__ ;"
    :48: Anonymous field of invalid type

I managed to complete installation after seeing this issue in another project, and upgrading the cryptography with its dependencies:

Collecting cryptography
  Downloading cryptography-1.8.1-cp27-cp27mu-macosx_10_10_x86_64.whl (1.5MB)
    100% |████████████████████████████████| 1.5MB 728kB/s
Collecting idna>=2.1 (from cryptography)
  Downloading idna-2.5-py2.py3-none-any.whl (55kB)
    100% |████████████████████████████████| 61kB 4.6MB/s
Requirement already up-to-date: enum34 in ./.pyenv/versions/2.7.12/lib/python2.7/site-packages (from cryptography)
Collecting setuptools>=11.3 (from cryptography)
  Downloading setuptools-35.0.2-py2.py3-none-any.whl (390kB)
    100% |████████████████████████████████| 399kB 2.1MB/s
Collecting ipaddress (from cryptography)
  Downloading ipaddress-1.0.18-py2-none-any.whl
Collecting cffi>=1.4.1 (from cryptography)
  Downloading cffi-1.10.0-cp27-cp27mu-macosx_10_10_x86_64.whl (157kB)
    100% |████████████████████████████████| 163kB 3.5MB/s
Requirement already up-to-date: packaging in ./.pyenv/versions/2.7.12/lib/python2.7/site-packages (from cryptography)
Requirement already up-to-date: six>=1.4.1 in ./.pyenv/versions/2.7.12/lib/python2.7/site-packages (from cryptography)
Collecting asn1crypto>=0.21.0 (from cryptography)
  Downloading asn1crypto-0.22.0-py2.py3-none-any.whl (97kB)
    100% |████████████████████████████████| 102kB 4.2MB/s
Requirement already up-to-date: appdirs>=1.4.0 in ./.pyenv/versions/2.7.12/lib/python2.7/site-packages (from setuptools>=11.3->cryptography)
Collecting pycparser (from cffi>=1.4.1->cryptography)
Requirement already up-to-date: pyparsing in ./.pyenv/versions/2.7.12/lib/python2.7/site-packages (from packaging->cryptography)
Installing collected packages: idna, setuptools, ipaddress, pycparser, cffi, asn1crypto, cryptography
  Found existing installation: idna 2.1
    Uninstalling idna-2.1:
      Successfully uninstalled idna-2.1
  Found existing installation: setuptools 34.3.3
    Uninstalling setuptools-34.3.3:
      Successfully uninstalled setuptools-34.3.3
  Found existing installation: ipaddress 1.0.17
    Uninstalling ipaddress-1.0.17:
      Successfully uninstalled ipaddress-1.0.17
  Found existing installation: pycparser 2.2
    Uninstalling pycparser-2.2:
      Successfully uninstalled pycparser-2.2
  Found existing installation: cffi 1.9.1
    Uninstalling cffi-1.9.1:
      Successfully uninstalled cffi-1.9.1
  Found existing installation: cryptography 1.5.3
    Uninstalling cryptography-1.5.3:
      Successfully uninstalled cryptography-1.5.3
Successfully installed asn1crypto-0.22.0 cffi-1.10.0 cryptography-1.8.1 idna-2.5 ipaddress-1.0.18 pycparser-2.17 setuptools-35.0.2

Installation then completed successfully:

Collecting locustio
  Downloading locustio-0.7.5.tar.gz (89kB)
    100% |████████████████████████████████| 92kB 2.8MB/s
Collecting gevent==1.1.1 (from locustio)
  Downloading gevent-1.1.1.tar.gz (2.0MB)
    100% |████████████████████████████████| 2.0MB 589kB/s
Requirement already satisfied: flask>=0.10.1 in ./.pyenv/versions/2.7.12/lib/python2.7/site-packages (from locustio)
Requirement already satisfied: requests>=2.9.1 in ./.pyenv/versions/2.7.12/lib/python2.7/site-packages (from locustio)
Requirement already satisfied: msgpack-python>=0.4.2 in ./.pyenv/versions/2.7.12/lib/python2.7/site-packages (from locustio)
Collecting greenlet>=0.4.9 (from gevent==1.1.1->locustio)
  Downloading greenlet-0.4.12.tar.gz (57kB)
    100% |████████████████████████████████| 61kB 4.5MB/s
Requirement already satisfied: click>=2.0 in ./.pyenv/versions/2.7.12/lib/python2.7/site-packages (from flask>=0.10.1->locustio)
Requirement already satisfied: Werkzeug>=0.7 in ./.pyenv/versions/2.7.12/lib/python2.7/site-packages (from flask>=0.10.1->locustio)
Requirement already satisfied: Jinja2>=2.4 in ./.pyenv/versions/2.7.12/lib/python2.7/site-packages (from flask>=0.10.1->locustio)
Requirement already satisfied: itsdangerous>=0.21 in ./.pyenv/versions/2.7.12/lib/python2.7/site-packages (from flask>=0.10.1->locustio)
Requirement already satisfied: MarkupSafe in ./.pyenv/versions/2.7.12/lib/python2.7/site-packages (from Jinja2>=2.4->flask>=0.10.1->locustio)
Installing collected packages: greenlet, gevent, locustio
  Running setup.py install for greenlet ... done
  Running setup.py install for gevent ... -    done
  Running setup.py install for locustio ... done
Successfully installed gevent-1.1.1 greenlet-0.4.12 locustio-0.7.5
@aldenpeterson-wf
Copy link
Contributor

Are you still seeing this on 0.8.0?

@uhlhosting
Copy link

Collecting locustio
  Downloading locustio-0.8.1.tar.gz (222kB)
    100% |################################| 225kB 2.5MB/s
Collecting gevent>=1.2.2 (from locustio)
  Downloading gevent-1.2.2-cp27-cp27m-macosx_10_6_intel.whl (1.1MB)
    100% |################################| 1.1MB 944kB/s
Collecting flask>=0.10.1 (from locustio)
  Downloading Flask-0.12.2-py2.py3-none-any.whl (83kB)
    100% |################################| 92kB 7.2MB/s
Requirement already satisfied: requests>=2.9.1 in /Library/Python/2.7/site-packages (from locustio)
Collecting msgpack-python>=0.4.2 (from locustio)
  Downloading msgpack-python-0.4.8.tar.gz (113kB)
    100% |################################| 122kB 5.0MB/s
Collecting six>=1.10.0 (from locustio)
  Downloading six-1.11.0-py2.py3-none-any.whl
Collecting pyzmq>=16.0.2 (from locustio)
  Downloading pyzmq-16.0.2-cp27-cp27m-macosx_10_6_intel.whl (1.1MB)
    100% |################################| 1.1MB 1.0MB/s
Requirement already satisfied: greenlet>=0.4.10 in /Library/Python/2.7/site-packages (from gevent>=1.2.2->locustio)
Collecting Jinja2>=2.4 (from flask>=0.10.1->locustio)
  Downloading Jinja2-2.9.6-py2.py3-none-any.whl (340kB)
    100% |################################| 348kB 4.4MB/s
Collecting Werkzeug>=0.7 (from flask>=0.10.1->locustio)
  Downloading Werkzeug-0.12.2-py2.py3-none-any.whl (312kB)
    100% |################################| 317kB 3.2MB/s
Collecting click>=2.0 (from flask>=0.10.1->locustio)
  Downloading click-6.7-py2.py3-none-any.whl (71kB)
    100% |################################| 71kB 6.2MB/s
Collecting itsdangerous>=0.21 (from flask>=0.10.1->locustio)
  Downloading itsdangerous-0.24.tar.gz (46kB)
    100% |################################| 51kB 7.7MB/s
Requirement already satisfied: certifi>=2017.4.17 in /Library/Python/2.7/site-packages (from requests>=2.9.1->locustio)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /Library/Python/2.7/site-packages (from requests>=2.9.1->locustio)
Requirement already satisfied: idna<2.7,>=2.5 in /Library/Python/2.7/site-packages (from requests>=2.9.1->locustio)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in /Library/Python/2.7/site-packages (from requests>=2.9.1->locustio)
Collecting MarkupSafe>=0.23 (from Jinja2>=2.4->flask>=0.10.1->locustio)
  Downloading MarkupSafe-1.0.tar.gz
Building wheels for collected packages: locustio, msgpack-python, itsdangerous, MarkupSafe
  Running setup.py bdist_wheel for locustio ... done
  Stored in directory: /var/root/Library/Caches/pip/wheels/4e/a7/fb/7b31b08cd56a4a36e9dad5fc679147a1e905daa7b8abc0f34d
  Running setup.py bdist_wheel for msgpack-python ... done
  Stored in directory: /var/root/Library/Caches/pip/wheels/2c/e7/e7/9031652a69d594665c5ca25e41d0fb3faa024e730b590e4402
  Running setup.py bdist_wheel for itsdangerous ... done
  Stored in directory: /var/root/Library/Caches/pip/wheels/fc/a8/66/24d655233c757e178d45dea2de22a04c6d92766abfb741129a
  Running setup.py bdist_wheel for MarkupSafe ... done
  Stored in directory: /var/root/Library/Caches/pip/wheels/88/a7/30/e39a54a87bcbe25308fa3ca64e8ddc75d9b3e5afa21ee32d57
Successfully built locustio msgpack-python itsdangerous MarkupSafe
Installing collected packages: gevent, MarkupSafe, Jinja2, Werkzeug, click, itsdangerous, flask, msgpack-python, six, pyzmq, locustio
  Found existing installation: six 1.4.1
    DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
    Uninstalling six-1.4.1:
Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/usr/local/lib/python2.7/site-packages/pip/req/req_set.py", line 778, in install
    requirement.uninstall(auto_confirm=True)
  File "/usr/local/lib/python2.7/site-packages/pip/req/req_install.py", line 754, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/usr/local/lib/python2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove
    renames(path, new_path)
  File "/usr/local/lib/python2.7/site-packages/pip/utils/__init__.py", line 267, in renames
    shutil.move(old, new)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move
    copy2(src, real_dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2
    copystat(src, dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat
    os.chflags(dst, st.st_flags)
OSError: [Errno 1] Operation not permitted: '/tmp/pip-fXy12c-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'

@uhlhosting
Copy link

same issues unable to install.

@jonhadfield
Copy link
Author

@aldenpeterson-wf I'm unable to reproduce now. I tried downgrading cffi, cryptography and gevent, but it still successfully installs with locustio 0.7.5. It must have been another dependency that's been upgraded since. OpenSSL perhaps?

@uhlhosting I think your issue is unrelated. It looks like you're using the system Python and I've experienced issues with that. This has some detail: https://apple.stackexchange.com/questions/209572/how-to-use-pip-after-the-os-x-el-capitan-upgrade
I'd suggest using homebrew or something like pyenv.

@uhlhosting
Copy link

uhlhosting commented Oct 17, 2017

I have rebuild Python and reinstalled pip then it worked fine to install it.

@jonhadfield
Copy link
Author

This one is saying that pip is trying to add/modify a file and your user doesn't have permissions. Running with sudo (maybe with -H) should resolve that.
OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/pyzmq-16.0.2.dist-info'
This one also looks permission related as it's changing filesystem flags. See: https://docs.python.org/2/library/os.html#os.chflags.
Could you try with sudo and post the results?

@mbeacom
Copy link
Member

mbeacom commented Nov 15, 2017

It appears this issue has been resolved. If you experience the issue again, feel free to re-open!

@mbeacom mbeacom closed this as completed Nov 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants