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

Pylint installation failed on macOS #563

Closed
evisong opened this issue Jan 10, 2018 · 1 comment
Closed

Pylint installation failed on macOS #563

evisong opened this issue Jan 10, 2018 · 1 comment
Labels
area-linting feature-request Request for new features or functionality

Comments

@evisong
Copy link

evisong commented Jan 10, 2018

Environment data

VS Code version: 1.19.1
Python Extension version: 0.9.1
Python Version: 2.7.10
OS and version: macOS Sierra 10.12.6 (16G29)

Actual behavior

Pylint installation failed

Expected behavior

Pylint installation should succeed silently

Steps to reproduce:

  • Newly installed Python plugin in VSCode
  • In a python project, VSCode prompted to install pylint, click yes
  • In Terminal, it run "python" -m pip install -U pylint automatically
  • However the 1st trial failed:
...
Installing collected packages: backports.functools-lru-cache, six, singledispatch, enum34, lazy-object-proxy, wrapt, astroid, configparser, mccabe, isort, pylint
Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 784, in install
    **kwargs
  File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "/Library/Python/2.7/site-packages/pip/wheel.py", line 345, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/Library/Python/2.7/site-packages/pip/wheel.py", line 316, in clobber
    ensure_dir(destdir)
  File "/Library/Python/2.7/site-packages/pip/utils/__init__.py", line 83, in ensure_dir
    os.makedirs(path)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/backports'
  • Add sudo manually
$ sudo "python" -m pip install -U pylint
...
  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 "/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 778, in install
    requirement.uninstall(auto_confirm=True)
  File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 754, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/Library/Python/2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove
    renames(path, new_path)
  File "/Library/Python/2.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-1bfjY5-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'
$ sudo "python" -m pip install -U pylint --ignore-installed six
...
Installing collected packages: mccabe, six, singledispatch, enum34, backports.functools-lru-cache, lazy-object-proxy, wrapt, astroid, configparser, isort, pylint
Successfully installed astroid-1.6.0 backports.functools-lru-cache-1.4 configparser-3.5.0 enum34-1.1.6 isort-4.2.15 lazy-object-proxy-1.3.1 mccabe-0.6.1 pylint-1.8.1 singledispatch-3.4.0.3 six-1.11.0 wrapt-1.10.11
@DonJayamanne
Copy link

Closing as this is a duplicate of #386
This should be fixed in the next release.

@DonJayamanne DonJayamanne added closed-duplicate feature-request Request for new features or functionality area-linting labels Jan 10, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jul 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-linting feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

2 participants