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

CodeIntel fails to install using pip2 #4

Open
nicoleepp opened this issue Jun 24, 2018 · 11 comments
Open

CodeIntel fails to install using pip2 #4

nicoleepp opened this issue Jun 24, 2018 · 11 comments

Comments

@nicoleepp
Copy link

$ 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
@mrelemerson
Copy link

I have the same error with Python 2.7.15rc1

@ghost
Copy link

ghost commented Jul 6, 2018

Same here.

@ghost
Copy link

ghost commented Jul 6, 2018

Found a workaround: just tell pip to install version 5 of clang: pip install clang==5.0 then run pip install --upgrade --pre CodeIntel and it should work again.

@mrelemerson
Copy link

@openmedi I still have the error.

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 "/tmp/pip-build-9WLvMh/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

@ghost
Copy link

ghost commented Jul 6, 2018

Using cached https://files.pythonhosted.org/packages/b2/2a/5ab52ae9d9e7684b66062e953a0cbdf326a35657aaf59cd31a09b7b86504/clang-6.0.0.1.tar.gz

This line shows that it wants to install version 6. Did you try pip install clang==5.0?

@mrelemerson
Copy link

@openmedi yes sir

@sangdth
Copy link

sangdth commented Aug 6, 2018

Still can not install CodeIntel. Installed clang===5.0 already.

Collecting CodeIntel
  Downloading https://files.pythonhosted.org/packages/0a/24/141db0d6c64453e6848849979b9c527d3547ad1552674763000e9da2a648/CodeIntel-2.0.0.tar.gz (20.7MB)
    100% |████████████████████████████████| 20.7MB 2.6MB/s
Collecting 3to2 (from CodeIntel)
  Downloading https://files.pythonhosted.org/packages/8f/ab/58a363eca982c40e9ee5a7ca439e8ffc5243dde2ae660ba1ffdd4868026b/3to2-1.1.1.zip (78kB)
    100% |████████████████████████████████| 81kB 1.2MB/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 6.0MB/s
Collecting cmdln (from CodeIntel)
  Downloading https://files.pythonhosted.org/packages/26/23/7654219ac89aa48190341b7c7114fea21e21889693def5f625ef2a218d5d/cmdln-2.0.0.zip (61kB)
    100% |████████████████████████████████| 61kB 13.1MB/s
Collecting esprima (from CodeIntel)
  Downloading https://files.pythonhosted.org/packages/86/61/ff7a62bcf79cebb6faf42c0ff28756c152a9dcf7244019093ca4513d80ee/esprima-4.0.0.tar.gz (46kB)
    100% |████████████████████████████████| 51kB 19.8MB/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-install-ilvjnch9/esprima/setup.py", line 8, in <module>
        from esprima import version
      File "/private/tmp/pip-install-ilvjnch9/esprima/esprima/__init__.py", line 29, in <module>
        from .esprima import *  # NOQA
      File "/private/tmp/pip-install-ilvjnch9/esprima/esprima/esprima.py", line 26, in <module>
        from .comment_handler import CommentHandler
      File "/private/tmp/pip-install-ilvjnch9/esprima/esprima/comment_handler.py", line 27, in <module>
        from .nodes import Node
      File "/private/tmp/pip-install-ilvjnch9/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/tmp/pip-install-ilvjnch9/esprima/

@ghost
Copy link

ghost commented Aug 7, 2018

@sangdth Your install fails because of esprima, not because of clang. This time the error is probably because async became a protected keyword. See #5.

Depending on your system (mac, windows) there are different workarounds available.

@gk4030
Copy link

gk4030 commented Sep 26, 2019

run:pip install clang==5.0 and pip install --upgrade --pre CodeIntel

ERROR: Command errored out with exit status 1:
command: 'c:\python27\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\users\Admin\appdata\local\temp\pip-install-mjtft9\inflector\setup.py'"'"'; file='"'"'c:\users\Admin\appdata\local\temp\pip-install-mjtft9\inflector\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
cwd: c:\users\Admin\appdata\local\temp\pip-install-mjtft9\inflector
Complete output (5 lines):
Traceback (most recent call last):
File "", line 1, in
File "c:\users\Admin\appdata\local\temp\pip-install-mjtft9\inflector\setup.py", line 6, in
README = open(os.path.join(here, 'README.md'), 'r', encoding='utf-8').read()
TypeError: 'encoding' is an invalid keyword argument for this function
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

@gk4030
Copy link

gk4030 commented Sep 26, 2019

my Resolvent:pip install inflector==2.0.12

@uitta
Copy link

uitta commented Oct 3, 2019

@gk4030 thanks, it worked!

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

5 participants