Python:ide:visualstudiocode

De Les Tutoriaux du WebMestre
Aller à : navigation, rechercher

Installation de Visual Studio Code

Installation de l'extension donjayamanne.python

jpmena@jpmena-P34:~/CONSULTANT/PYTHON$ code --install-extension donjayamanne.python
Extension 'donjayamanne.python' is already installed.
  • redémarrer VisualStudio Code si nécessaire ou reccharger

Effet Magique VisualStudio Code complète l'installation Système de Python

  • VSCode trouve qu'il lui manque le paquet PyLint, je clique sur le menu installer qu'il propose
  • VSCode ouvre alors la partie console laquelle lance automatiquement:
jpmena@jpmena-P34:~/CONSULTANT/PYTHON/TracesGPX$ /usr/bin/python -m pip install pylint
Collecting pylint
  Downloading pylint-1.7.2-py2.py3-none-any.whl (644kB)
    100% |████████████████████████████████| 645kB 1.5MB/s
Collecting six (from pylint)
  Downloading six-1.10.0-py2.py3-none-any.whl
Collecting mccabe (from pylint)
  Downloading mccabe-0.6.1-py2.py3-none-any.whl
Collecting singledispatch; python_version < "3.4" (from pylint)
  Downloading singledispatch-3.4.0.3-py2.py3-none-any.whl
Collecting isort>=4.2.5 (from pylint)
  Downloading isort-4.2.15-py2.py3-none-any.whl (43kB)
    100% |████████████████████████████████| 51kB 4.5MB/s
Collecting astroid>=1.5.1 (from pylint)
  Downloading astroid-1.5.3-py2.py3-none-any.whl (269kB)
    100% |████████████████████████████████| 276kB 2.1MB/s
Collecting configparser; python_version == "2.7" (from pylint)
  Downloading configparser-3.5.0.tar.gz
Collecting backports.functools-lru-cache; python_version == "2.7" (from pylint)
  Downloading backports.functools_lru_cache-1.4-py2.py3-none-any.whl
Collecting enum34>=1.1.3; python_version < "3.4" (from astroid>=1.5.1->pylint)
  Downloading enum34-1.1.6-py2-none-any.whl
Collecting lazy-object-proxy (from astroid>=1.5.1->pylint)
  Downloading lazy_object_proxy-1.3.1-cp27-cp27mu-manylinux1_x86_64.whl (56kB)
    100% |████████████████████████████████| 61kB 3.5MB/s
Collecting wrapt (from astroid>=1.5.1->pylint)
  Downloading wrapt-1.10.10.tar.gz
Building wheels for collected packages: configparser, wrapt
  Running setup.py bdist_wheel for configparser ... done
  Stored in directory: /home/jpmena/.cache/pip/wheels/1c/bd/b4/277af3f6c40645661b4cd1c21df26aca0f2e1e9714a1d4cda8
  Running setup.py bdist_wheel for wrapt ... done
  Stored in directory: /home/jpmena/.cache/pip/wheels/22/a5/9f/ca577d0e7b917b681fdbb7b36a41a8a9ae76fb7fec146438dc
Successfully built configparser wrapt
Installing collected packages: six, mccabe, singledispatch, isort, enum34, lazy-object-proxy, wrapt, backports.functools-lru-cache, astroid, confi
gparser, pylint
Successfully installed astroid backports.functools-lru-cache configparser enum34-1.1.2 isort lazy-object-proxy mccabe pylint singledispatch six-1.
10.0 wrapt
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
  • De mon côté je passe la même commande (sous root) pour Python3/pip3
jpmena@jpmena-P34:~/CONSULTANT/PYTHON$ sudo /usr/bin/python3 -m pip install pylint
The directory '/home/jpmena/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/jpmena/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pylint
  Downloading pylint-1.7.2-py2.py3-none-any.whl (644kB)
    100% |████████████████████████████████| 645kB 1.7MB/s 
Collecting mccabe (from pylint)
  Downloading mccabe-0.6.1-py2.py3-none-any.whl
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from pylint)
Collecting isort>=4.2.5 (from pylint)
  Downloading isort-4.2.15-py2.py3-none-any.whl (43kB)
    100% |████████████████████████████████| 51kB 5.9MB/s 
Collecting astroid>=1.5.1 (from pylint)
  Downloading astroid-1.5.3-py2.py3-none-any.whl (269kB)
    100% |████████████████████████████████| 276kB 2.8MB/s 
Collecting lazy-object-proxy (from astroid>=1.5.1->pylint)
  Downloading lazy_object_proxy-1.3.1-cp35-cp35m-manylinux1_x86_64.whl (55kB)
    100% |████████████████████████████████| 61kB 3.4MB/s 
Collecting wrapt (from astroid>=1.5.1->pylint)
Installing collected packages: mccabe, isort, lazy-object-proxy, wrapt, astroid, pylint
Successfully installed astroid-1.5.3 isort-4.2.15 lazy-object-proxy-1.3.1 mccabe-0.6.1 pylint-1.7.2 wrapt-1.10.10

J'installe aussi l'autre extension proposée Python for VSCode

jpmena@jpmena-P34:~$ code --install-extension tht13.python
Found 'tht13.python' in the marketplace.
Installing...
Extension 'tht13.python' v0.2.3 was successfully installed!