Skip to content

Support installing tools into a private cache directory #236

@esutton

Description

@esutton

Environment data

VS Code version: 1.18.0 (1.18.0)
Python Extension version: 0.8.0
Python Version: Python 2.7.10
OS and version: macOS Sierra 10.12.6

Steps to reproduce:

  1. Install ms-python.python
  2. Open a Python source file
  3. Error Linter pylint is not installed
  4. Press "Install pylint"
  5. Install fails trying to mkdir
   Permission denied: '/Library/Python/2.7/site-packages/enum'

Tips or suggestions appreciated. ( I am not a Python expert )

Logs

Output from Console window (Help->Developer Tools menu)

/usr/bin/python -m pip install pylint
edwards-mbp:source edward3$ /usr/bin/python -m pip install pylint
Collecting pylint
  Using cached pylint-1.7.4-py2.py3-none-any.whl
Collecting astroid>=1.5.1 (from pylint)
  Using cached astroid-1.5.3-py2.py3-none-any.whl
Collecting singledispatch; python_version < "3.4" (from pylint)
  Using cached singledispatch-3.4.0.3-py2.py3-none-any.whl
Collecting mccabe (from pylint)
  Using cached mccabe-0.6.1-py2.py3-none-any.whl
Collecting backports.functools-lru-cache; python_version == "2.7" (from pylint)
  Using cached backports.functools_lru_cache-1.4-py2.py3-none-any.whl
Requirement already satisfied: six in /Library/Python/2.7/site-packages/six-1.10.0-py2.7.egg (from pylint)
Collecting isort>=4.2.5 (from pylint)
  Using cached isort-4.2.15-py2.py3-none-any.whl
Collecting configparser; python_version == "2.7" (from pylint)
  Using cached configparser-3.5.0.tar.gz
Collecting enum34>=1.1.3; python_version < "3.4" (from astroid>=1.5.1->pylint)
  Using cached enum34-1.1.6-py2-none-any.whl
Collecting lazy-object-proxy (from astroid>=1.5.1->pylint)
  Using cached lazy-object-proxy-1.3.1.tar.gz
Collecting wrapt (from astroid>=1.5.1->pylint)
  Using cached wrapt-1.10.11.tar.gz
Installing collected packages: enum34, singledispatch, lazy-object-proxy, backports.functools-lru-cache, wrapt, astroid, mccabe, isort, configparser, pylint
Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_set.py", line 784, in install
    **kwargs
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/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-9.0.1-py2.7.egg/pip/req/req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 345, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 316, in clobber
    ensure_dir(destdir)
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/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/enum'
edwards-mbp:source edward3$

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestRequest for new features or functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions