我该如何解决这个Jupyter安装错误

时间:2019-12-22 07:29:57

标签: python python-3.x pip jupyter

操作系统:Windows 10 Python-版本 3.8.1

命令: pip install jupyterlab

错误消息

C:\Users\Nebras>pip install jupyterlab
Collecting jupyterlab
  Using cached https://files.pythonhosted.org/packages/35/9a/6e81535ed42ad01ec2a5e8f9e0419108f60fab36e48dc1168fa5e0576a81/jupyterlab-1.2.4-py2.py3-none-any.whl
Collecting tornado!=6.0.0,!=6.0.1,!=6.0.2
  Using cached https://files.pythonhosted.org/packages/30/78/2d2823598496127b21423baffaa186b668f73cd91887fcef78b6eade136b/tornado-6.0.3.tar.gz
Collecting jupyterlab-server~=1.0.0
  Using cached https://files.pythonhosted.org/packages/78/98/5b87b9d38176bd98f23b58a8fb730e5124618d68571a011abbd38ad4a842/jupyterlab_server-1.0.6-py3-none-any.whl
Requirement already satisfied: jinja2>=2.10 in c:\python38\lib\site-packages (from jupyterlab) (2.10.3)
Collecting notebook>=4.3.1
  Using cached https://files.pythonhosted.org/packages/f5/69/d2ffaf7efc20ce47469187e3a41e6e03e17b45de5a6559f4e7ab3eace5e1/notebook-6.0.2-py3-none-any.whl
Collecting jsonschema>=3.0.1
  Using cached https://files.pythonhosted.org/packages/c5/8f/51e89ce52a085483359217bc72cdbf6e75ee595d5b1d4b5ade40c7e018b8/jsonschema-3.2.0-py2.py3-none-any.whl
Collecting json5
  Using cached https://files.pythonhosted.org/packages/30/44/062543d4a6718f99d82e5ecf9140dbdee8a03122f2c34fbd0b0609891707/json5-0.8.5-py2.py3-none-any.whl
Requirement already satisfied: MarkupSafe>=0.23 in c:\python38\lib\site-packages (from jinja2>=2.10->jupyterlab) (1.1.1)
Collecting terminado>=0.8.1
  Using cached https://files.pythonhosted.org/packages/ff/96/1d9a2c23990aea8f8e0b5c3b6627d03196a73771a17a2d9860bbe9823ab6/terminado-0.8.3-py2.py3-none-any.whl
Collecting ipykernel
  Using cached https://files.pythonhosted.org/packages/e1/92/8fec943b5b81078399f969f00557804d884c96fcd0bc296e81a2ed4fd270/ipykernel-5.1.3-py3-none-any.whl
Collecting pyzmq>=17
  Using cached https://files.pythonhosted.org/packages/ff/9c/8ab517738ce8e0bc51b83231b5eabcdc96c4e9075a306f45ebaa0ef7e4ad/pyzmq-18.1.1-cp38-cp38-win32.whl
Collecting Send2Trash
  Using cached https://files.pythonhosted.org/packages/49/46/c3dc27481d1cc57b9385aff41c474ceb7714f7935b1247194adae45db714/Send2Trash-1.5.0-py3-none-any.whl
Collecting jupyter-client>=5.3.4
  Using cached https://files.pythonhosted.org/packages/13/81/fe0eee1bcf949851a120254b1f530ae1e01bdde2d3ab9710c6ff81525061/jupyter_client-5.3.4-py2.py3-none-any.whl
Collecting traitlets>=4.2.1
  Using cached https://files.pythonhosted.org/packages/ca/ab/872a23e29cec3cf2594af7e857f18b687ad21039c1f9b922fac5b9b142d5/traitlets-4.3.3-py2.py3-none-any.whl
Collecting ipython-genutils
  Using cached https://files.pythonhosted.org/packages/fa/bc/9bd3b5c2b4774d5f33b2d544f1460be9df7df2fe42f352135381c347c69a/ipython_genutils-0.2.0-py2.py3-none-any.whl
Collecting prometheus-client
  Using cached https://files.pythonhosted.org/packages/b3/23/41a5a24b502d35a4ad50a5bb7202a5e1d9a0364d0c12f56db3dbf7aca76d/prometheus_client-0.7.1.tar.gz
Collecting nbformat
  Using cached https://files.pythonhosted.org/packages/da/27/9a654d2b6cc1eaa517d1c5a4405166c7f6d72f04f6e7eea41855fe808a46/nbformat-4.4.0-py2.py3-none-any.whl
Collecting nbconvert
  Using cached https://files.pythonhosted.org/packages/79/6c/05a569e9f703d18aacb89b7ad6075b404e8a4afde2c26b73ca77bb644b14/nbconvert-5.6.1-py2.py3-none-any.whl
Collecting jupyter-core>=4.6.0
  Using cached https://files.pythonhosted.org/packages/fb/82/86437f661875e30682e99d04c13ba6c216f86f5f6ca6ef212d3ee8b6ca11/jupyter_core-4.6.1-py2.py3-none-any.whl
Collecting pyrsistent>=0.14.0
  Using cached https://files.pythonhosted.org/packages/6c/6f/c1a2e8da80a0029f6b618d7e20e1a6f2a61dd04e2e54225309c2cc4268f7/pyrsistent-0.15.6.tar.gz
Collecting attrs>=17.4.0
  Using cached https://files.pythonhosted.org/packages/a2/db/4313ab3be961f7a763066401fb77f7748373b6094076ae2bda2806988af6/attrs-19.3.0-py2.py3-none-any.whl
Requirement already satisfied: six>=1.11.0 in c:\python38\lib\site-packages (from jsonschema>=3.0.1->jupyterlab-server~=1.0.0->jupyterlab) (1.13.0)
Requirement already satisfied: setuptools in c:\python38\lib\site-packages (from jsonschema>=3.0.1->jupyterlab-server~=1.0.0->jupyterlab) (41.2.0)
Collecting pywinpty>=0.5; os_name == "nt"
  Using cached https://files.pythonhosted.org/packages/5d/97/8e43c2152a638cdb83d45644eb125c752abe67249f94bb3e3e29b0709685/pywinpty-0.5.7.tar.gz
    ERROR: Command errored out with exit status 1:
     command: 'c:\python38\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Nebras\\AppData\\Local\\Temp\\pip-install-k9arp803\\pywinpty\\setup.py'"'"'; __file__='"'"'C:\\Users\\Nebras\\AppData\\Local\\Temp\\pip-install-k9arp803\\pywinpty\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Nebras\AppData\Local\Temp\pip-install-k9arp803\pywinpty\pip-egg-info'
         cwd: C:\Users\Nebras\AppData\Local\Temp\pip-install-k9arp803\pywinpty\
    Complete output (161 lines):
    Compiling C:\Users\Nebras\AppData\Local\Temp\easy_install-rmwbcwk4\Cython-0.29.14\Cython\Plex\Scanners.py because it changed.
    Compiling C:\Users\Nebras\AppData\Local\Temp\easy_install-rmwbcwk4\Cython-0.29.14\Cython\Plex\Actions.py because it changed.
    Compiling C:\Users\Nebras\AppData\Local\Temp\easy_install-rmwbcwk4\Cython-0.29.14\Cython\Compiler\Scanning.py because it changed.
    Compiling C:\Users\Nebras\AppData\Local\Temp\easy_install-rmwbcwk4\Cython-0.29.14\Cython\Compiler\Visitor.py because it changed.
    Compiling C:\Users\Nebras\AppData\Local\Temp\easy_install-rmwbcwk4\Cython-0.29.14\Cython\Compiler\FlowControl.py because it changed.
    Compiling C:\Users\Nebras\AppData\Local\Temp\easy_install-rmwbcwk4\Cython-0.29.14\Cython\Runtime\refnanny.pyx because it changed.
    Compiling C:\Users\Nebras\AppData\Local\Temp\easy_install-rmwbcwk4\Cython-0.29.14\Cython\Compiler\FusedNode.py because it changed.
    Compiling C:\Users\Nebras\AppData\Local\Temp\easy_install-rmwbcwk4\Cython-0.29.14\Cython\Tempita\_tempita.py because it changed.
    [1/8] Cythonizing C:\Users\Nebras\AppData\Local\Temp\easy_install-rmwbcwk4\Cython-0.29.14\Cython\Compiler\FlowControl.py
    [2/8] Cythonizing C:\Users\Nebras\AppData\Local\Temp\easy_install-rmwbcwk4\Cython-0.29.14\Cython\Compiler\FusedNode.py
    [3/8] Cythonizing C:\Users\Nebras\AppData\Local\Temp\easy_install-rmwbcwk4\Cython-0.29.14\Cython\Compiler\Scanning.py
    [4/8] Cythonizing C:\Users\Nebras\AppData\Local\Temp\easy_install-rmwbcwk4\Cython-0.29.14\Cython\Compiler\Visitor.py
    [5/8] Cythonizing C:\Users\Nebras\AppData\Local\Temp\easy_install-rmwbcwk4\Cython-0.29.14\Cython\Plex\Actions.py
    [6/8] Cythonizing C:\Users\Nebras\AppData\Local\Temp\easy_install-rmwbcwk4\Cython-0.29.14\Cython\Plex\Scanners.py
    [7/8] Cythonizing C:\Users\Nebras\AppData\Local\Temp\easy_install-rmwbcwk4\Cython-0.29.14\Cython\Runtime\refnanny.pyx
    [8/8] Cythonizing C:\Users\Nebras\AppData\Local\Temp\easy_install-rmwbcwk4\Cython-0.29.14\Cython\Tempita\_tempita.py
    Unable to find pgen, not compiling formal grammar.
    warning: no files found matching 'Doc\*'
    warning: no files found matching '*.pyx' under directory 'Cython\Debugger\Tests'
    warning: no files found matching '*.pxd' under directory 'Cython\Debugger\Tests'
    warning: no files found matching '*.pxd' under directory 'Cython\Utility'
    warning: no files found matching 'pyximport\README'
    Traceback (most recent call last):
      File "c:\python38\lib\site-packages\setuptools\msvc.py", line 489, in _find_latest_available_vc_ver
        return self.find_available_vc_vers()[-1]
    IndexError: list index out of range

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "c:\python38\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "c:\python38\lib\distutils\dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "c:\python38\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "c:\python38\lib\site-packages\setuptools\command\bdist_egg.py", line 172, in run
        cmd = self.call_command('install_lib', warn_dir=0)
      File "c:\python38\lib\site-packages\setuptools\command\bdist_egg.py", line 158, in call_command
        self.run_command(cmdname)
      File "c:\python38\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "c:\python38\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "c:\python38\lib\site-packages\setuptools\command\install_lib.py", line 11, in run
        self.build()
      File "c:\python38\lib\distutils\command\install_lib.py", line 107, in build
        self.run_command('build_ext')
      File "c:\python38\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "c:\python38\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "c:\python38\lib\site-packages\setuptools\command\build_ext.py", line 84, in run
        _build_ext.run(self)
      File "c:\python38\lib\distutils\command\build_ext.py", line 340, in run
        self.build_extensions()
      File "c:\python38\lib\distutils\command\build_ext.py", line 449, in build_extensions
        self._build_extensions_serial()
      File "c:\python38\lib\distutils\command\build_ext.py", line 474, in _build_extensions_serial
        self.build_extension(ext)
      File "c:\python38\lib\site-packages\setuptools\command\build_ext.py", line 205, in build_extension
        _build_ext.build_extension(self, ext)
      File "c:\python38\lib\distutils\command\build_ext.py", line 528, in build_extension
        objects = self.compiler.compile(sources,
      File "c:\python38\lib\distutils\_msvccompiler.py", line 360, in compile
        self.initialize()
      File "c:\python38\lib\distutils\_msvccompiler.py", line 253, in initialize
        vc_env = _get_vc_env(plat_spec)
      File "c:\python38\lib\site-packages\setuptools\msvc.py", line 185, in msvc14_get_vc_env
        return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()
      File "c:\python38\lib\site-packages\setuptools\msvc.py", line 843, in __init__
        self.si = SystemInfo(self.ri, vc_ver)
      File "c:\python38\lib\site-packages\setuptools\msvc.py", line 485, in __init__
        self.vc_ver = vc_ver or self._find_latest_available_vc_ver()
      File "c:\python38\lib\site-packages\setuptools\msvc.py", line 492, in _find_latest_available_vc_ver
        raise distutils.errors.DistutilsPlatformError(err)
    distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "c:\python38\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
        yield saved
      File "c:\python38\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
        yield
      File "c:\python38\lib\site-packages\setuptools\sandbox.py", line 250, in run_setup
        _execfile(setup_script, ns)
      File "c:\python38\lib\site-packages\setuptools\sandbox.py", line 45, in _execfile
        exec(code, globals, locals)
      File "C:\Users\Nebras\AppData\Local\Temp\easy_install-rmwbcwk4\Cython-0.29.14\setup.py", line 228, in <module>
      File "c:\python38\lib\site-packages\setuptools\__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "c:\python38\lib\distutils\core.py", line 163, in setup
        raise SystemExit("error: " + str(msg))
    SystemExit: error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "c:\python38\lib\site-packages\setuptools\command\easy_install.py", line 1144, in run_setup
        run_setup(setup_script, args)
      File "c:\python38\lib\site-packages\setuptools\sandbox.py", line 253, in run_setup
        raise
      File "c:\python38\lib\contextlib.py", line 131, in __exit__
        self.gen.throw(type, value, traceback)
      File "c:\python38\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
        yield
      File "c:\python38\lib\contextlib.py", line 131, in __exit__
        self.gen.throw(type, value, traceback)
      File "c:\python38\lib\site-packages\setuptools\sandbox.py", line 166, in save_modules
        saved_exc.resume()
      File "c:\python38\lib\site-packages\setuptools\sandbox.py", line 141, in resume
        six.reraise(type, exc, self._tb)
      File "c:\python38\lib\site-packages\setuptools\_vendor\six.py", line 685, in reraise
        raise value.with_traceback(tb)
      File "c:\python38\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
        yield saved
      File "c:\python38\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
        yield
      File "c:\python38\lib\site-packages\setuptools\sandbox.py", line 250, in run_setup
        _execfile(setup_script, ns)
      File "c:\python38\lib\site-packages\setuptools\sandbox.py", line 45, in _execfile
        exec(code, globals, locals)
      File "C:\Users\Nebras\AppData\Local\Temp\easy_install-rmwbcwk4\Cython-0.29.14\setup.py", line 228, in <module>
      File "c:\python38\lib\site-packages\setuptools\__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "c:\python38\lib\distutils\core.py", line 163, in setup
        raise SystemExit("error: " + str(msg))
    SystemExit: error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Nebras\AppData\Local\Temp\pip-install-k9arp803\pywinpty\setup.py", line 68, in <module>
        setup(
      File "c:\python38\lib\site-packages\setuptools\__init__.py", line 144, in setup
        _install_setup_requires(attrs)
      File "c:\python38\lib\site-packages\setuptools\__init__.py", line 139, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "c:\python38\lib\site-packages\setuptools\dist.py", line 716, in fetch_build_eggs
        resolved_dists = pkg_resources.working_set.resolve(
      File "c:\python38\lib\site-packages\pkg_resources\__init__.py", line 780, in resolve
        dist = best[req.key] = env.best_match(
      File "c:\python38\lib\site-packages\pkg_resources\__init__.py", line 1065, in best_match
        return self.obtain(req, installer)
      File "c:\python38\lib\site-packages\pkg_resources\__init__.py", line 1077, in obtain
        return installer(requirement)
      File "c:\python38\lib\site-packages\setuptools\dist.py", line 786, in fetch_build_egg
        return cmd.easy_install(req)
      File "c:\python38\lib\site-packages\setuptools\command\easy_install.py", line 679, in easy_install
        return self.install_item(spec, dist.location, tmpdir, deps)
      File "c:\python38\lib\site-packages\setuptools\command\easy_install.py", line 705, in install_item
        dists = self.install_eggs(spec, download, tmpdir)
      File "c:\python38\lib\site-packages\setuptools\command\easy_install.py", line 890, in install_eggs
        return self.build_and_install(setup_script, setup_base)
      File "c:\python38\lib\site-packages\setuptools\command\easy_install.py", line 1158, in build_and_install
        self.run_setup(setup_script, setup_base, args)
      File "c:\python38\lib\site-packages\setuptools\command\easy_install.py", line 1146, in run_setup
        raise DistutilsError("Setup script exited with %s" % (v.args[0],))
    distutils.errors.DistutilsError: Setup script exited with error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.```

0 个答案:

没有答案