在Windows 10虚拟机上使用Python 3.8安装jupyter时出现问题

2024-04-26 13:17:41 发布

您现在位置:Python中文网/ 问答频道 /正文

也许有人能帮忙。在mac上托管的Windows 10虚拟机上安装jupyter时遇到问题。Python版本是3.8.2

我在Windows虚拟机中尝试过:

 pip install jupyter
 pip install notebook
 pip install jupyterlab

基本上是所有变体。:)。无论如何,似乎有一个SSL错误正在发生,我无法推断。谢谢你的帮助。堆栈跟踪张贴在下面

ERROR: Command errored out with exit status 1:
 command: 'c:\users\jeff h\appdata\local\programs\python\python38-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Jeff H\\AppData\\Local\\Temp\\pip-install-o1ayeuqg\\pywinpty\\setup.py'"'"'; __file__='"'"'C:\\Users\\Jeff H\\AppData\\Local\\Temp\\pip-install-o1ayeuqg\\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\Jeff H\AppData\Local\Temp\pip-install-o1ayeuqg\pywinpty\pip-egg-info'
     cwd: C:\Users\Jeff H\AppData\Local\Temp\pip-install-o1ayeuqg\pywinpty\
Complete output (83 lines):
Traceback (most recent call last):
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\urllib\request.py", line 1319, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\http\client.py", line 1230, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\http\client.py", line 1276, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\http\client.py", line 1225, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\http\client.py", line 1004, in _send_output
    self.send(msg)
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\http\client.py", line 944, in send
    self.connect()
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\http\client.py", line 1399, in connect
    self.sock = self._context.wrap_socket(self.sock,
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\ssl.py", line 1040, in _create
    self.do_handshake()
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\package_index.py", line 766, in open_url
    return open_with_auth(url, self.opener)
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\package_index.py", line 961, in _socket_timeout
    return func(*args, **kwargs)
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\package_index.py", line 1080, in open_with_auth
    fp = opener(request)
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\urllib\request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\urllib\request.py", line 525, in open
    response = self._open(req, data)
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\urllib\request.py", line 542, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\urllib\request.py", line 502, in _call_chain
    result = func(*args)
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\urllib\request.py", line 1362, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\urllib\request.py", line 1322, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\Jeff H\AppData\Local\Temp\pip-install-o1ayeuqg\pywinpty\setup.py", line 68, in <module>
    setup(
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\__init__.py", line 144, in setup
    _install_setup_requires(attrs)
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\__init__.py", line 139, in _install_setup_requires
    dist.fetch_build_eggs(dist.setup_requires)
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\dist.py", line 716, in fetch_build_eggs
    resolved_dists = pkg_resources.working_set.resolve(
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\site-packages\pkg_resources\__init__.py", line 780, in resolve
    dist = best[req.key] = env.best_match(
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\site-packages\pkg_resources\__init__.py", line 1065, in best_match
    return self.obtain(req, installer)
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\site-packages\pkg_resources\__init__.py", line 1077, in obtain
    return installer(requirement)
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\dist.py", line 786, in fetch_build_egg
    return cmd.easy_install(req)
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 665, in easy_install
    dist = self.package_index.fetch_distribution(
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\package_index.py", line 655, in fetch_distribution
    dist = find(requirement)
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\package_index.py", line 635, in find
    loc = self.download(dist.location, tmpdir)
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\package_index.py", line 579, in download
    found = self._download_url(scheme.group(1), spec, tmpdir)
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\package_index.py", line 824, in _download_url
    return self._attempt_download(url, filename)
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\package_index.py", line 830, in _attempt_download
    headers = self._download_to(url, filename)
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\package_index.py", line 729, in _download_to
    fp = self.open_url(url)
  File "c:\users\jeff h\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\package_index.py", line 779, in open_url
    raise DistutilsError("Download error for %s: %s"
distutils.errors.DistutilsError: Download error for https://files.pythonhosted.org/packages/d4/ad/9ebf6d2edcf9678c2ff6b7eaee6ff2edc0b11a4f484417ed604ee9bb7e92/Cython-0.29.16-py2.py3-none-any.whl#sha256=772c13250aea33ac17eb042544b310f0dc3862bbde49b334f5c12f7d1b627476: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Tags: inpyselflibpackageslocallinesite
1条回答
网友
1楼 · 发布于 2024-04-26 13:17:41

你被困在防火墙或其他公司代理的后面。就这样。 根据您的公司政策以及他们在web上运行或安装在您的计算机上的任何内容,解决方案可以简单到通过移动热点连接您的计算机。这就是我一直在做的。或者把你的电脑带回家,然后在那里运行整个过程

相关问题 更多 >