【问题标题】:facing an error while installing jupyter notebook in windows 10 pro, python3.8.0 using command prompt使用命令提示符在 windows 10 pro、python3.8.0 中安装 jupyter notebook 时遇到错误
【发布时间】:2019-10-29 07:27:31
【问题描述】:
 ERROR: Command errored out with exit status 1:
     command: 'c:\program files (x86)\python38-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Fazle L1\\AppData\\Local\\Temp\\pip-install-in9a_swm\\pywinpty\\setup.py'"'"'; __file__='"'"'C:\\Users\\Fazle L1\\AppData\\Local\\Temp\\pip-install-in9a_swm\\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\Fazle L1\AppData\Local\Temp\pip-install-in9a_swm\pywinpty\pip-egg-info'
         cwd: C:\Users\Fazle L1\AppData\Local\Temp\pip-install-in9a_swm\pywinpty\
    Complete output (147 lines):
    Unable to find pgen, not compiling formal grammar.
    Traceback (most recent call last):
      File "c:\program files (x86)\python38-32\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "c:\program files (x86)\python38-32\lib\distutils\dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "c:\program files (x86)\python38-32\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\command\bdist_egg.py", line 163, in run
        self.run_command("egg_info")
      File "c:\program files (x86)\python38-32\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "c:\program files (x86)\python38-32\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\command\egg_info.py", line 283, in run
        self.mkpath(self.egg_info)
      File "c:\program files (x86)\python38-32\lib\distutils\cmd.py", line 338, in mkpath
        dir_util.mkpath(name, mode, dry_run=self.dry_run)
      File "c:\program files (x86)\python38-32\lib\distutils\dir_util.py", line 70, in mkpath
        os.mkdir(head, mode)
      File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\sandbox.py", line 310, in wrap
        path = self._remap_input(name, path, *args, **kw)
      File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\sandbox.py", line 452, in _remap_input
        self._violation(operation, os.path.realpath(path), *args, **kw)
      File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\sandbox.py", line 407, in _violation
        raise SandboxViolation(operation, args, kw)
    setuptools.sandbox.SandboxViolation: SandboxViolation: mkdir('C:\\Users\\FAZLEL~1\\AppData\\Local\\Temp\\easy_install-tsax775m\\Cython-0.29.13\\Cython.egg-info', 511) {}

软件包设置脚本已尝试修改您系统上的文件 不在 EasyInstall 构建区域内,并且已中止。

EasyInstall 无法安全地安装此软件包,并且可能不会 即使您运行其设置,也支持备用安装位置 手写脚本。请告知包的作者和 EasyInstall 维护人员了解是否有可用的修复或解决方法。

在处理上述异常的过程中,又发生了一个异常:

Traceback (most recent call last):
  File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
    yield saved
  File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
    yield
  File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\sandbox.py", line 250, in run_setup
    _execfile(setup_script, ns)
  File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\sandbox.py", line 45, in _execfile
    exec(code, globals, locals)
  File "C:\Users\FAZLEL~1\AppData\Local\Temp\easy_install-tsax775m\Cython-0.29.13\setup.py", line 228, in <module>
  File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "c:\program files (x86)\python38-32\lib\distutils\core.py", line 163, in setup
    raise SystemExit("error: " + str(msg))
SystemExit: error: SandboxViolation: mkdir('C:\\Users\\FAZLEL~1\\AppData\\Local\\Temp\\easy_install-tsax775m\\Cython-0.29.13\\Cython.egg-info', 511) {}

The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.

This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand.  Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 1144, in run_setup
    run_setup(setup_script, args)
  File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\sandbox.py", line 253, in run_setup
    raise
  File "c:\program files (x86)\python38-32\lib\contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
    yield
  File "c:\program files (x86)\python38-32\lib\contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\sandbox.py", line 166, in save_modules
    saved_exc.resume()
  File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\sandbox.py", line 141, in resume
    six.reraise(type, exc, self._tb)
  File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\_vendor\six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
    yield saved
  File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
    yield
  File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\sandbox.py", line 250, in run_setup
    _execfile(setup_script, ns)
  File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\sandbox.py", line 45, in _execfile
    exec(code, globals, locals)
  File "C:\Users\FAZLEL~1\AppData\Local\Temp\easy_install-tsax775m\Cython-0.29.13\setup.py", line 228, in <module>
  File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "c:\program files (x86)\python38-32\lib\distutils\core.py", line 163, in setup
    raise SystemExit("error: " + str(msg))
SystemExit: error: SandboxViolation: mkdir('C:\\Users\\FAZLEL~1\\AppData\\Local\\Temp\\easy_install-tsax775m\\Cython-0.29.13\\Cython.egg-info', 511) {}

The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.

This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand.  Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\Fazle L1\AppData\Local\Temp\pip-install-in9a_swm\pywinpty\setup.py", line 68, in <module>
    setup(
  File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\__init__.py", line 144, in setup
    _install_setup_requires(attrs)
  File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\__init__.py", line 139, in _install_setup_requires
    dist.fetch_build_eggs(dist.setup_requires)
  File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\dist.py", line 716, in fetch_build_eggs
    resolved_dists = pkg_resources.working_set.resolve(
  File "c:\program files (x86)\python38-32\lib\site-packages\pkg_resources\__init__.py", line 780, in resolve
    dist = best[req.key] = env.best_match(
  File "c:\program files (x86)\python38-32\lib\site-packages\pkg_resources\__init__.py", line 1065, in best_match
    return self.obtain(req, installer)
  File "c:\program files (x86)\python38-32\lib\site-packages\pkg_resources\__init__.py", line 1077, in obtain
    return installer(requirement)
  File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\dist.py", line 786, in fetch_build_egg
    return cmd.easy_install(req)
  File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 679, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 705, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 890, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 1158, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "c:\program files (x86)\python38-32\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: SandboxViolation: mkdir('C:\\Users\\FAZLEL~1\\AppData\\Local\\Temp\\easy_install-tsax775m\\Cython-0.29.13\\Cython.egg-info', 511) {}

The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.

This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand.  Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.

----------------------------------------

ERROR: Command errored out with exit status 1: python setup.py egg_info 检查日志以获取完整的命令输出。pip install jupyter

【问题讨论】:

    标签: python-3.x


    【解决方案1】:

    据我所知,您在安装 pywinpty 软件包时遇到了问题。尝试单独安装看看,是否正确。
    截至本文发布之时,该软件包的负责人尚未发布 Python 3.8 的 wheel(在 PyPI entry page 上的 Python version 列中查找 cp38 并将其与 @ 进行比较987654322@)。有计划(见GIT issue)这样做,但到目前为止还没有。该线程中也部分指定了以下解决方案。

    手动安装pywinpty

    1. 非官方的wheel 可以找到here。在文件名中查找 cp38 并下载适合您的 Python 版本(32 位或 64 位)的正确文件。
    2. 打开一个外壳并执行如下所示的命令。根据您下载的文件更改文件的名称。这将从指定的wheel 手动安装包。
    python -m pip install .\pywinpty-0.5.5-cp38-cp38-win32.whl
    
    1. 现在可以正常安装jupyter了。所需的软件包现已安装,您的安装应该会成功。

    一旦官方wheel 发布pip 应该能够自动安装jupyter 而无需此解决方法。

    【讨论】:

    • 我无法在我的系统中安装 .\pywinpty-0.5.7-cp38-cp38-win_amd64.whl ,同时安装它会引发这样的错误。错误:pywinpty-0.5.7-cp38-cp38-win_amd64.whl 不是该平台支持的轮子。
    • 我很惊讶这个答案没有被接受。我竖起大拇指@SkipperWR
    猜你喜欢
    • 1970-01-01
    • 2019-04-08
    • 2021-04-11
    • 2020-12-07
    • 2021-09-06
    • 2018-10-15
    • 1970-01-01
    • 1970-01-01
    • 2020-10-11
    相关资源
    最近更新 更多