2017-01-03 7 views
1

Python Version jupyter Installation: 2,7UnicodeEncodeError wenn

Windows-Version: Windows 7 64bit

Ich habe ein Problem, wenn jupyter installieren. Als Ich mag es nicht Anaconda verwenden, habe ich versucht zu installieren jupyter von:

pip install jupyter 

Allerdings stand ich folgendes Problem:

File "c:\python27\lib\encodings\cp1252.py", line 12, in encode 
    UnicodeEncodeError: 'charmap' codec can't encode characters in position 10-18: character maps to <undefined> 

serfed ich das Netz und fand Lösungen nur für Probleme mit Skripten aber nicht mit pip install direkt verwenden.

Dies ist eine der Quellen: UnicodeEncodeError: 'charmap' codec can't encode - character maps to <undefined>, print function

Ich versuchte ipython neu zu installieren und pip zu aktualisieren. Bei ihnen ist jedoch alles in Ordnung, und das Problem blieb ungelöst.

Ich habe auch versucht, Fehler innerhalb c:\python27\lib\encodings\cp1252.py zu beheben, konnte aber nichts nützliches tun.

Bitte helfen Sie mir mit Ihren eigenen Vorschlägen zu diesem Problem (oder eine Lösung, wenn möglich). Danke im Voraus!

UPD: voller Fehler von cmd:

C:\Users\Александр>pip install jupyter 
Collecting jupyter 
    Using cached jupyter-1.0.0-py2.py3-none-any.whl 
Collecting nbconvert (from jupyter) 
    Using cached nbconvert-5.0.0-py2.py3-none-any.whl 
Collecting notebook (from jupyter) 
    Using cached notebook-4.3.1-py2.py3-none-any.whl 
Collecting ipykernel (from jupyter) 
    Using cached ipykernel-4.5.2-py2.py3-none-any.whl 
Collecting jupyter-console (from jupyter) 
    Using cached jupyter_console-5.0.0-py2.py3-none-any.whl 
Collecting ipywidgets (from jupyter) 
    Using cached ipywidgets-5.2.2-py2.py3-none-any.whl 
Collecting qtconsole (from jupyter) 
    Using cached qtconsole-4.2.1-py2.py3-none-any.whl 
Collecting jinja2 (from nbconvert->jupyter) 
    Using cached Jinja2-2.8.1-py2.py3-none-any.whl 
Requirement already satisfied: pygments in c:\python27\lib\site-packages (from nbconvert->jupyter) 
Collecting mistune!=0.6 (from nbconvert->jupyter) 
    Using cached mistune-0.7.3-py2.py3-none-any.whl 
Requirement already satisfied: traitlets>=4.2 in c:\python27\lib\site-packages (from nbconvert->jupyter) 
Collecting nbformat (from nbconvert->jupyter) 
    Using cached nbformat-4.2.0-py2.py3-none-any.whl 
Collecting entrypoints>=0.2.2 (from nbconvert->jupyter) 
    Using cached entrypoints-0.2.2-py2.py3-none-any.whl 
Collecting pandocfilters>=1.4.1 (from nbconvert->jupyter) 
    Using cached pandocfilters-1.4.1.tar.gz 
Collecting testpath (from nbconvert->jupyter) 
    Using cached testpath-0.3-py2.py3-none-any.whl 
Collecting jupyter-core (from nbconvert->jupyter) 
    Using cached jupyter_core-4.2.1-py2.py3-none-any.whl 
Collecting bleach (from nbconvert->jupyter) 
    Using cached bleach-1.5.0-py2.py3-none-any.whl 
Requirement already satisfied: ipython-genutils in c:\python27\lib\site-packages(from notebook->jupyter) 
Collecting jupyter-client (from notebook->jupyter) 
    Using cached jupyter_client-4.4.0-py2.py3-none-any.whl 
Collecting tornado>=4 (from notebook->jupyter) 
    Using cached tornado-4.4.2.tar.gz 
Requirement already satisfied: ipython>=4.0.0 in c:\python27\lib\site-packages (from ipykernel->jupyter) 
Requirement already satisfied: prompt-toolkit<2.0.0,>=1.0.0 in c:\python27\lib\site-packages (from jupyter-console->jupyter) 
Collecting widgetsnbextension>=1.2.6 (from ipywidgets->jupyter) 
    Using cached widgetsnbextension-1.2.6-py2.py3-none-any.whl 
Collecting MarkupSafe (from jinja2->nbconvert->jupyter) 
    Using cached MarkupSafe-0.23.tar.gz 
Requirement already satisfied: enum34; python_version == "2.7" in c:\python27\lib\site-packages (from traitlets>=4.2->nbconvert->jupyter) 
Requirement already satisfied: six in c:\python27\lib\site-packages (from traitlets>=4.2->nbconvert->jupyter) 
Requirement already satisfied: decorator in c:\python27\lib\site-packages (fromtraitlets>=4.2->nbconvert->jupyter) 
Collecting jsonschema!=2.5.0,>=2.4 (from nbformat->nbconvert->jupyter) 
    Using cached jsonschema-2.5.1-py2.py3-none-any.whl 
Collecting configparser>=3.5; python_version == "2.7" (from entrypoints>=0.2.2->nbconvert->jupyter) 
    Using cached configparser-3.5.0.tar.gz 
Collecting html5lib!=0.9999,!=0.99999,<0.99999999,>=0.999 (from bleach->nbconvert->jupyter) 
    Using cached html5lib-0.9999999.tar.gz 
Collecting pyzmq>=13 (from jupyter-client->notebook->jupyter) 
    Using cached pyzmq-16.0.2-cp27-cp27m-win_amd64.whl 
Collecting singledispatch (from tornado>=4->notebook->jupyter) 
    Using cached singledispatch-3.4.0.3-py2.py3-none-any.whl 
Requirement already satisfied: certifi in c:\python27\lib\site-packages (from tornado>=4->notebook->jupyter) 
Collecting backports_abc>=0.4 (from tornado>=4->notebook->jupyter) 
    Using cached backports_abc-0.5-py2.py3-none-any.whl 
Requirement already satisfied: win-unicode-console>=0.5; sys_platform == "win32" in c:\python27\lib\site-packages (from ipython>=4.0.0->ipykernel->jupyter) 
Requirement already satisfied: simplegeneric>0.8 in c:\python27\lib\site-packages (from ipython>=4.0.0->ipykernel->jupyter) 
Requirement already satisfied: backports.shutil-get-terminal-size; python_version == "2.7" in c:\python27\lib\site-packages (from ipython>=4.0.0->ipykernel->jupyter) 
Requirement already satisfied: setuptools>=18.5 in c:\python27\lib\site-packages(from ipython>=4.0.0->ipykernel->jupyter) 
Requirement already satisfied: pathlib2; python_version == "2.7" or python_version == "3.3" in c:\python27\lib\site-packages (from ipython>=4.0.0->ipykernel->jupyter) 
Requirement already satisfied: colorama; sys_platform == "win32" in c:\python27\lib\site-packages (from ipython>=4.0.0->ipykernel->jupyter) 
Requirement already satisfied: pickleshare in c:\python27\lib\site-packages (from ipython>=4.0.0->ipykernel->jupyter) 
Requirement already satisfied: wcwidth in c:\python27\lib\site-packages (from prompt-toolkit<2.0.0,>=1.0.0->jupyter-console->jupyter) 
Collecting functools32; python_version == "2.7" (from jsonschema!=2.5.0,>=2.4->nbformat->nbconvert->jupyter) 
    Using cached functools32-3.2.3-2.zip 
Installing collected packages: MarkupSafe, jinja2, mistune, jupyter-core, functools32, jsonschema, nbformat, configparser, entrypoints, pandocfilters, testpath, html5lib, bleach, nbconvert, singledispatch, backports-abc, tornado, pyzmq, jupyter-client, ipykernel, notebook, jupyter-console, widgetsnbextension, ipywidgets, qtconsole, jupyter 
    Running setup.py install for MarkupSafe ... error 
    Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\8523~1\\appdata\\local\\temp\\pip-build-rwadde\\MarkupSafe\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read(). 
replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\8523~1\appdata\local\temp\pip-gcsvl3-record\install-record.txt 
--single-version-externally-managed --compile: 
running install 
running build 
running build_py 
creating build 
creating build\lib.win-amd64-2.7 
creating build\lib.win-amd64-2.7\markupsafe 
copying markupsafe\tests.py -> build\lib.win-amd64-2.7\markupsafe 
copying markupsafe\_compat.py -> build\lib.win-amd64-2.7\markupsafe 
copying markupsafe\_constants.py -> build\lib.win-amd64-2.7\markupsafe 
copying markupsafe\_native.py -> build\lib.win-amd64-2.7\markupsafe 
copying markupsafe\__init__.py -> build\lib.win-amd64-2.7\markupsafe 
running egg_info 
writing MarkupSafe.egg-info\PKG-INFO 
writing top-level names to MarkupSafe.egg-info\top_level.txt 
writing dependency_links to MarkupSafe.egg-info\dependency_links.txt 
warning: manifest_maker: standard file '-c' not found 

reading manifest file 'MarkupSafe.egg-info\SOURCES.txt' 
reading manifest template 'MANIFEST.in' 
writing manifest file 'MarkupSafe.egg-info\SOURCES.txt' 
copying markupsafe\_speedups.c -> build\lib.win-amd64-2.7\markupsafe 
running build_ext 
building 'markupsafe._speedups' extension 
Traceback (most recent call last): 
    File "<string>", line 1, in <module> 
    File "c:\users\8523~1\appdata\local\temp\pip-build-rwadde\MarkupSafe\setup.py", line 120, in <module> 
    try_building_extension() 
    File "c:\users\8523~1\appdata\local\temp\pip-build-rwadde\MarkupSafe\setup.py", line 99, in try_building_extension 
    run_setup(True) 
    File "c:\users\8523~1\appdata\local\temp\pip-build-rwadde\MarkupSafe\setup.py", line 93, in run_setup 
    ext_modules=ext_modules, 
    File "c:\python27\lib\distutils\core.py", line 151, in setup 
    dist.run_commands() 
    File "c:\python27\lib\distutils\dist.py", line 953, in run_commands 
    self.run_command(cmd) 
    File "c:\python27\lib\distutils\dist.py", line 972, in run_command 
    cmd_obj.run() 
    File "c:\python27\lib\site-packages\setuptools\command\install.py", line 61, in run 
    return orig.install.run(self) 
    File "c:\python27\lib\distutils\command\install.py", line 563, in run 
    self.run_command('build') 
    File "c:\python27\lib\distutils\cmd.py", line 326, in run_command 
    self.distribution.run_command(command) 
    File "c:\python27\lib\distutils\dist.py", line 972, in run_command 
    cmd_obj.run() 
    File "c:\python27\lib\distutils\command\build.py", line 127, in run 
    self.run_command(cmd_name) 
    File "c:\python27\lib\distutils\cmd.py", line 326, in run_command 
    self.distribution.run_command(command) 
    File "c:\python27\lib\distutils\dist.py", line 972, in run_command 
    cmd_obj.run() 
    File "c:\users\8523~1\appdata\local\temp\pip-build-rwadde\MarkupSafe\setup.py", line 41, in run 
    build_ext.run(self) 
    File "c:\python27\lib\distutils\command\build_ext.py", line 339, in run 
    self.build_extensions() 
    File "c:\python27\lib\distutils\command\build_ext.py", line 448, in build_extensions 
    self.build_extension(ext) 
    File "c:\users\8523~1\appdata\local\temp\pip-build-rwadde\MarkupSafe\setup.py", line 47, in build_extension 
    build_ext.build_extension(self, ext) 
    File "c:\python27\lib\distutils\command\build_ext.py", line 498, in build_extension 
    depends=ext.depends) 
    File "c:\python27\lib\distutils\msvc9compiler.py", line 473, in compile 
    self.initialize() 
    File "c:\python27\lib\distutils\msvc9compiler.py", line 383, in initialize 

    vc_env = query_vcvarsall(VERSION, plat_spec) 
    File "c:\python27\lib\site-packages\setuptools\msvc9_support.py", line 52, in query_vcvarsall 
    return unpatched['query_vcvarsall'](version, *args, **kwargs) 
    File "c:\python27\lib\distutils\msvc9compiler.py", line 275, in query_vcvarsall 
    stderr=subprocess.PIPE) 
    File "c:\python27\lib\subprocess.py", line 711, in __init__ 
    errread, errwrite) 
    File "c:\python27\lib\subprocess.py", line 959, in _execute_child 
    startupinfo) 
    File "c:\python27\lib\encodings\cp1252.py", line 12, in encode 
    return codecs.charmap_encode(input,errors,encoding_table) 
UnicodeEncodeError: 'charmap' codec can't encode characters in position 10-18: character maps to <undefined> 
+0

Bitte mehr von der Stacktrace enthalten, so können wir sehen, was passiert. Es gab Probleme mit Pip- und Nicht-ASCII-Zeichen in Hostnamen und Benutzernamen. ZB https://github.com/pypa/pip/issues/3463 – bobince

+0

@bobince, siehe mein Update oben – Alex

+0

@bobince, versuchte, meinen Benutzernamen zu ändern und hatte einen Erfolg. Ths für eine Verbindung. – Alex

Antwort

Verwandte Themen