Skip to content

CodeIntel fails to install on both python 2 AND python 3 on macOS 10.13.5 #6

Open
@ghost

Description

See for python 2 error, issue #4

$ python --version
Python 2.7.15

$ pip install --upgrade --pre CodeIntel
Collecting CodeIntel
  Using cached https://files.pythonhosted.org/packages/b9/e1/e8de333336f3b9ff2d3efa3be1468d633f7a504ff4787c2159470ab7157c/CodeIntel-2.0.0-cp27-cp27m-macosx_10_12_x86_64.whl
Collecting inflector (from CodeIntel)
  Using cached https://files.pythonhosted.org/packages/c4/51/d3cc209c8a0471ef5a04ac750f203b5b486fc70e6cb51c96d99decd49bc4/Inflector-2.0.12.tar.gz
Collecting chardet (from CodeIntel)
  Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting clang (from CodeIntel)
  Using cached https://files.pythonhosted.org/packages/b2/2a/5ab52ae9d9e7684b66062e953a0cbdf326a35657aaf59cd31a09b7b86504/clang-6.0.0.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/z_/q30gz8bs17g3p15d_2cv08w80000gn/T/pip-install-U1WyMp/clang/setup.py", line 6, in <module>
        with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
    TypeError: 'encoding' is an invalid keyword argument for this function

See for python 3 errors issue #5:

Error 1 has to do with breaking changes in python 3.7:

$ pip3 install --upgrade --pre CodeIntel
Collecting CodeIntel
  Downloading https://files.pythonhosted.org/packages/0a/24/141db0d6c64453e6848849979b9c527d3547ad1552674763000e9da2a648/CodeIntel-2.0.0.tar.gz (20.7MB)
    100% |████████████████████████████████| 20.7MB 1.0MB/s 
Collecting 3to2 (from CodeIntel)
  Downloading https://files.pythonhosted.org/packages/8f/ab/58a363eca982c40e9ee5a7ca439e8ffc5243dde2ae660ba1ffdd4868026b/3to2-1.1.1.zip (78kB)
    100% |████████████████████████████████| 81kB 10.1MB/s 
Collecting applib (from CodeIntel)
  Downloading https://files.pythonhosted.org/packages/d4/20/67c3c98b557cfa2aa95dc0a9281989e6ab740a5058ee1f8a5f8febba8aaf/applib-1.2.tar.gz
Collecting chardet (from CodeIntel)
  Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
    100% |████████████████████████████████| 143kB 9.0MB/s 
Collecting cmdln (from CodeIntel)
  Downloading https://files.pythonhosted.org/packages/26/23/7654219ac89aa48190341b7c7114fea21e21889693def5f625ef2a218d5d/cmdln-2.0.0.zip (61kB)
    100% |████████████████████████████████| 61kB 12.1MB/s 
Collecting esprima (from CodeIntel)
  Downloading https://files.pythonhosted.org/packages/86/61/ff7a62bcf79cebb6faf42c0ff28756c152a9dcf7244019093ca4513d80ee/esprima-4.0.0.tar.gz (46kB)
    100% |████████████████████████████████| 51kB 10.9MB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/7n/wgzp5xg5643g24cjx93sqlq00000gn/T/pip-install-kwyha1ca/esprima/setup.py", line 8, in <module>
        from esprima import version
      File "/private/var/folders/7n/wgzp5xg5643g24cjx93sqlq00000gn/T/pip-install-kwyha1ca/esprima/esprima/__init__.py", line 29, in <module>
        from .esprima import *  # NOQA
      File "/private/var/folders/7n/wgzp5xg5643g24cjx93sqlq00000gn/T/pip-install-kwyha1ca/esprima/esprima/esprima.py", line 26, in <module>
        from .comment_handler import CommentHandler
      File "/private/var/folders/7n/wgzp5xg5643g24cjx93sqlq00000gn/T/pip-install-kwyha1ca/esprima/esprima/comment_handler.py", line 27, in <module>
        from .nodes import Node
      File "/private/var/folders/7n/wgzp5xg5643g24cjx93sqlq00000gn/T/pip-install-kwyha1ca/esprima/esprima/nodes.py", line 61
        self.async = False
                 ^
    SyntaxError: invalid syntax
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/7n/wgzp5xg5643g24cjx93sqlq00000gn/T/pip-install-kwyha1ca/esprima/

This can be worked around by using python 3.6.5 either by using brew switch 3.6.5 or by using this pyenv workaround.

However installation still fails:

$ pip3 install --upgrade --pre CodeIntel
Collecting CodeIntel
  Using cached https://files.pythonhosted.org/packages/85/58/8e708906b4a2f4c811691f791f8f409f703c3ea1bd2a55373eb45077324e/CodeIntel-2.0.0-cp36-cp36m-macosx_10_12_x86_64.whl
Collecting 3to2 (from CodeIntel)
  Using cached https://files.pythonhosted.org/packages/8f/ab/58a363eca982c40e9ee5a7ca439e8ffc5243dde2ae660ba1ffdd4868026b/3to2-1.1.1.zip
Collecting libclang-py3 (from CodeIntel)
  Using cached https://files.pythonhosted.org/packages/aa/73/d0cc2b5e896bf6ea152b2324d00963ec6b0b116bb5ed672018c0bacd97c0/libclang-py3-3.9.0.tar.gz
Collecting esprima (from CodeIntel)
  Using cached https://files.pythonhosted.org/packages/86/61/ff7a62bcf79cebb6faf42c0ff28756c152a9dcf7244019093ca4513d80ee/esprima-4.0.0.tar.gz
Collecting zope.cachedescriptors (from CodeIntel)
  Using cached https://files.pythonhosted.org/packages/81/6f/d668102e1bd4fba6cfb160e178477b4e5ade20ccac0b2b390d4f64d0bb9d/zope.cachedescriptors-4.3.1-py2.py3-none-any.whl
Collecting inflector (from CodeIntel)
  Using cached https://files.pythonhosted.org/packages/c4/51/d3cc209c8a0471ef5a04ac750f203b5b486fc70e6cb51c96d99decd49bc4/Inflector-2.0.12.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/7n/wgzp5xg5643g24cjx93sqlq00000gn/T/pip-install-i8xj2h72/inflector/setup.py", line 6, in <module>
        README = open(os.path.join(here, 'README.md')).read()
      File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 375: ordinal not in range(128)
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/7n/wgzp5xg5643g24cjx93sqlq00000gn/T/pip-install-i8xj2h72/inflector/

Looking at the repo for inflector I found an issue about python3 compatibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions