PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Python-Plugin für Visual Studio Code installieren.


johla
2017-01-17, 13:49:28
Ich habe auf Windows 10 64 Visual Studio Code installiert, und dann die Installationsschritte vom Python-Plugin gemacht: https://marketplace.visualstudio.com/items?itemName=donjayamanne.python

1. Install the extension
Make sure jedi and ctags are installed.
2. Install jedi using pip install jedi.
3. Install ctags from here, or using brew install ctags on OSX.
If Python is in the current path
You're ready to use it.
4. If using a custom Python Version or a Virtual Environment, use the command Select Workspace Interpreter)
1. und 2. hat funktioniert.

zu 3.: Wie installiere ich ctags von http://ctags.sourceforge.net/ ? In der ctags58.zip von der ctags-Webseite sind nur Quelltextdateien und eine ctags.exe. Muss ich die EXE wo hin kopieren? Wohin?

zu 4.: Noch nicht gemacht.

VS Code will pylint installieren. Dabei kommt folgende Fehlermeldung: Requirement already satisfied: six in c:\users\Username\appdata\local\programs\python\python36\lib\site-packages (from pylint)
Collecting mccabe (from pylint)
Using cached mccabe-0.5.3-py2.py3-none-any.whl
Collecting wrapt (from astroid<1.5.0,>=1.4.5->pylint)
Using cached wrapt-1.10.8.tar.gz
Requirement already satisfied: lazy-object-proxy in c:\users\Username\appdata\local\programs\python\python36\lib\site-packages (from astroid<1.5.0,>=1.4.5->pylint)
Installing collected packages: colorama, wrapt, astroid, mccabe, pylint
Running setup.py install for wrapt ... error
Exception:
Traceback (most recent call last):
File "C:\Users\Username\AppData\Local\Programs\Python\Python36\lib\site-packages\pip\compat\__init__.py", line 73, in console_to_str
return s.decode(sys.__stdout__.encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x94 in position 95: invalid start byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Username\AppData\Local\Programs\Python\Python36\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\Users\Username\AppData\Local\Programs\Python\Python36\lib\site-packages\pip\commands\install.py", line 342, in run
prefix=options.prefix_path,
File "C:\Users\Username\AppData\Local\Programs\Python\Python36\lib\site-packages\pip\req\req_set.py", line 784, in install
**kwargs
File "C:\Users\Username\AppData\Local\Programs\Python\Python36\lib\site-packages\pip\req\req_install.py", line 878, in install
spinner=spinner,
File "C:\Users\Username\AppData\Local\Programs\Python\Python36\lib\site-packages\pip\utils\__init__.py", line 676, in call_subprocess
line = console_to_str(proc.stdout.readline())
File "C:\Users\Username\AppData\Local\Programs\Python\Python36\lib\site-packages\pip\compat\__init__.py", line 75, in console_to_str
return s.decode('utf_8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x94 in position 95: invalid start byteWas kann ich da machen?

Dr.Doom
2017-01-17, 15:35:55
zu 3.: Wie installiere ich ctags von http://ctags.sourceforge.net/ ?Gar nicht, das ist ein Werkzeug für die Kommandozeile. Irgendwohin kopieren und eine Umgebungsvariable setzen.

EDIT:
Jetzt hab' ich's auch gelesen:

If Python is in the current path
You're ready to use it.

Vmtl soll man das Verzeichnis ins Python-Verzeichnis kopieren, sodass ctags.exe neben der python.exe liegt. Klingt komisch, aber wie soll man das anders verstehen.

johla
2017-01-18, 05:59:57
Gar nicht, das ist ein Werkzeug für die Kommandozeile. Irgendwohin kopieren und eine Umgebungsvariable setzen.

EDIT:
Jetzt hab' ich's auch gelesen:

If Python is in the current path
You're ready to use it.
Ich glaube, das bezieht sich nicht auf 3. Schau mal auf https://marketplace.visualstudio.com/items?itemName=donjayamanne.python Abschnitt "Quick Start".