pipenv安装烧瓶由于错误而失败

时间:2019-12-15 06:35:20

标签: python flask pipenv

在Windows 10的Python 3.8上安装flask时,发生了这样的错误。

(angluar_flask_191215-vYaqHO2B) C:\Users\user\angluar_flask_191215>pipenv install flask
Installing flask…
Adding flask to Pipfile's [packages]…
Installation Succeeded
Installing dependencies from Pipfile.lock (ac8e32)…
An error occurred while installing markupsafe==1.1.1 --hash=sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473 --hash=sha256:09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161 --hash=sha256:09c4b7f37d6c648cb13f9230d847adf22f8171b1ccc4d5682398e77f40309235 --hash=sha256:1027c282dad077d0bae18be6794e6b6b8c91d58ed8a8d89a89d59693b9131db5 --hash=sha256:24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff --hash=sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b --hash=sha256:43a55c2930bbc139570ac2452adf3d70cdbb3cfe5912c71cdce1c2c6bbd9c5d1 --hash=sha256:46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e --hash=sha256:500d4957e52ddc3351cabf489e79c91c17f6e0899158447047588650b5e69183 --hash=sha256:535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66 --hash=sha256:62fe6c95e3ec8a7fad637b7f3d372c15ec1caa01ab47926cfdf7a75b40e0eac1 --hash=sha256:6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1 --hash=sha256:717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e --hash=sha256:79855e1c5b8da654cf486b830bd42c06e8780cea587384cf6545b7d9ac013a0b --hash=sha256:7c1699dfe0cf8ff607dbdcc1e9b9af1755371f92a68f706051cc8c37d447c905 --hash=sha256:88e5fcfb52ee7b911e8bb6d6aa2fd21fbecc674eadd44118a9cc3863f938e735 --hash=sha256:8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d --hash=sha256:98c7086708b163d425c67c7a91bad6e466bb99d797aa64f965e9d25c12111a5e --hash=sha256:9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d --hash=sha256:9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c --hash=sha256:ade5e387d2ad0d7ebf59146cc00c8044acbd863725f887353a10df825fc8ae21 --hash=sha256:b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2 --hash=sha256:b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5 --hash=sha256:b2051432115498d3562c084a49bba65d97cf251f5a331c64a12ee7e04dacc51b --hash=sha256:ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6 --hash=sha256:c8716a48d94b06bb3b2524c2b77e055fb313aeb4ea620c8dd03a105574ba704f --hash=sha256:cd5df75523866410809ca100dc9681e301e3c27567cf498077e8551b6d20e42f --hash=sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7! Will try again.
  ================================ 6/6 - 00:00:05
Installing initially failed dependencies…
[pipenv.exceptions.InstallError]:   File "c:\users\783046\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\core.py", line 1983, in do_install
[pipenv.exceptions.InstallError]:       do_init(
[pipenv.exceptions.InstallError]:   File "c:\users\783046\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\core.py", line 1246, in do_init
[pipenv.exceptions.InstallError]:       do_install_dependencies(
[pipenv.exceptions.InstallError]:   File "c:\users\783046\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\core.py", line 858, in do_install_dependencies
[pipenv.exceptions.InstallError]:       batch_install(
[pipenv.exceptions.InstallError]:   File "c:\users\783046\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\core.py", line 763, in batch_install
[pipenv.exceptions.InstallError]:       _cleanup_procs(procs, not blocking, failed_deps_queue, retry=retry)
[pipenv.exceptions.InstallError]:   File "c:\users\783046\appdata\local\programs\python\python38-32\lib\site-packages\pipenv\core.py", line 681, in _cleanup_procs
[pipenv.exceptions.InstallError]:       raise exceptions.InstallError(c.dep.name, extra=err_lines)
[pipenv.exceptions.InstallError]: ['Collecting markupsafe==1.1.1', '  Using cached https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz', 'Building wheels for collected packages: markupsafe', '  Building wheel for markupsafe (setup.py): started', "  Building wheel for markupsafe (setup.py): finished with status 'error'", '  Running setup.py clean for markupsafe', 'Failed to build markupsafe', 'Installing collected packages: markupsafe', '    Running setup.py install for markupsafe: started', "    Running setup.py install for markupsafe: finished with status 'error'"]
[pipenv.exceptions.InstallError]: ['ERROR: Command errored out with exit status 1:', '   command: \'c:\\users\\783046\\.virtualenvs\\angluar_flask_191215-vyaqho2b\\scripts\\python.exe\' -u -c \'import sys, setuptools, tokenize; sys.argv[0] = \'"\'"\'C:\\\\Users\\\\783046\\\\AppData\\\\Local\\\\Temp\\\\pip-install-09p8hb8p\\\\markupsafe\\\\setup.py\'"\'"\'; __file__=\'"\'"\'C:\\\\Users\\\\783046\\\\AppData\\\\Local\\\\Temp\\\\pip-install-09p8hb8p\\\\markupsafe\\\\setup.py\'"\'"\';f=getattr(tokenize, \'"\'"\'open\'"\'"\', open)(__file__);code=f.read().replace(\'"\'"\'\\r\\n\'"\'"\', \'"\'"\'\\n\'"\'"\');f.close();exec(compile(code, __file__, \'"\'"\'exec\'"\'"\'))\' bdist_wheel -d \'C:\\Users\\783046\\AppData\\Local\\Temp\\pip-wheel-y6umgz13\' --python-tag cp38', '       cwd: C:\\Users\\783046\\AppData\\Local\\Temp\\pip-install-09p8hb8p\\markupsafe\\', '  Complete output (77 lines):', '  running bdist_wheel', '  running build', '  running build_py', '  creating build', '  creating build\\lib.win32-3.8', '  creating build\\lib.win32-3.8\\markupsafe', '  copying src\\markupsafe\\_compat.py -> build\\lib.win32-3.8\\markupsafe', '  copying src\\markupsafe\\_constants.py -> build\\lib.win32-3.8\\markupsafe', '  copying src\\markupsafe\\_native.py -> build\\lib.win32-3.8\\markupsafe', '  copying src\\markupsafe\\__init__.py -> build\\lib.win32-3.8\\markupsafe', '  running egg_info', '  writing src\\MarkupSafe.egg-info\\PKG-INFO', '  writing dependency_links to src\\MarkupSafe.egg-info\\dependency_links.txt', '  writing top-level names to src\\MarkupSafe.egg-info\\top_level.txt', "  reading manifest file 'src\\MarkupSafe.egg-info\\SOURCES.txt'", "  reading manifest template 'MANIFEST.in'", "  no previously-included directories found matching 'docs\\_build'", "  warning: no previously-included files matching '*.py[co]' found anywhere in distribution", "  writing manifest file 'src\\MarkupSafe.egg-info\\SOURCES.txt'", '  copying src\\markupsafe\\_speedups.c -> build\\lib.win32-3.8\\markupsafe', '  warning: build_py: byte-compiling is disabled, skipping.', '  ', '  running build_ext', "  building 'markupsafe._speedups' extension", '  Traceback (most recent call last):', '    File "<string>", line 1, in <module>', '    File "C:\\Users\\783046\\AppData\\Local\\Temp\\pip-install-09p8hb8p\\markupsafe\\setup.py", line 105, in <module>', '      run_setup(True)', '    File "C:\\Users\\783046\\AppData\\Local\\Temp\\pip-install-09p8hb8p\\markupsafe\\setup.py", line 53, in run_setup', '      setup(', '    File "c:\\users\\783046\\.virtualenvs\\angluar_flask_191215-vyaqho2b\\lib\\site-packages\\setuptools\\__init__.py", line 145, in setup', '      return distutils.core.setup(**attrs)', '    File "C:\\Users\\783046\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\distutils\\core.py", line 148, in setup', '      dist.run_commands()', '    File "C:\\Users\\783046\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\distutils\\dist.py", line 966, in run_commands', '      self.run_command(cmd)', '    File "C:\\Users\\783046\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\distutils\\dist.py", line 985, in run_command', '      cmd_obj.run()', '    File "c:\\users\\783046\\.virtualenvs\\angluar_flask_191215-vyaqho2b\\lib\\site-packages\\wheel\\bdist_wheel.py", line 192, in run', "      self.run_command('build')", '    File "C:\\Users\\783046\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\distutils\\cmd.py", line 313, in run_command', '      self.distribution.run_command(command)', '    File "C:\\Users\\783046\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\distutils\\dist.py", line 985, in run_command', '      cmd_obj.run()', '    File "C:\\Users\\783046\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\distutils\\command\\build.py", line 135, in run', '      self.run_command(cmd_name)', '    File "C:\\Users\\783046\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\distutils\\cmd.py", line 313, in run_command', '      self.distribution.run_command(command)', '    File "C:\\Users\\783046\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\distutils\\dist.py", line 985, in run_command', '      cmd_obj.run()', '    File "C:\\Users\\783046\\AppData\\Local\\Temp\\pip-install-09p8hb8p\\markupsafe\\setup.py", line 36, in run', '      build_ext.run(self)', '    File "c:\\users\\783046\\.virtualenvs\\angluar_flask_191215-vyaqho2b\\lib\\site-packages\\setuptools\\command\\build_ext.py", line 84, in run', '      _build_ext.run(self)', '    File "C:\\Users\\783046\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\distutils\\command\\build_ext.py", line 340, in run', '      self.build_extensions()', '    File "C:\\Users\\783046\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\distutils\\command\\build_ext.py", line 449, in build_extensions', '      self._build_extensions_serial()', '    File "C:\\Users\\783046\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\distutils\\command\\build_ext.py", line 474, in _build_extensions_serial', '      self.build_extension(ext)', '    File "C:\\Users\\783046\\AppData\\Local\\Temp\\pip-install-09p8hb8p\\markupsafe\\setup.py", line 42, in build_extension', '      build_ext.build_extension(self, ext)', '    File "c:\\users\\783046\\.virtualenvs\\angluar_flask_191215-vyaqho2b\\lib\\site-packages\\setuptools\\command\\build_ext.py", line 205, in build_extension', '      _build_ext.build_extension(self, ext)', '    File "C:\\Users\\783046\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\distutils\\command\\build_ext.py", line 528, in build_extension', '      objects = self.compiler.compile(sources,', '    File "C:\\Users\\783046\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\distutils\\_msvccompiler.py", line 360, in compile', '      self.initialize()', '    File "C:\\Users\\783046\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\distutils\\_msvccompiler.py", line 253, in initialize', '      vc_env = _get_vc_env(plat_spec)', '    File "c:\\users\\783046\\.virtualenvs\\angluar_flask_191215-vyaqho2b\\lib\\site-packages\\setuptools\\msvc.py", line 171, in msvc14_get_vc_env', '      return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()', '    File "c:\\users\\783046\\.virtualenvs\\angluar_flask_191215-vyaqho2b\\lib\\site-packages\\setuptools\\msvc.py", line 1620, in return_env', '      if self.vs_ver >= 14 and isfile(self.VCRuntimeRedist):', '    File "c:\\users\\783046\\.virtualenvs\\angluar_flask_191215-vyaqho2b\\lib\\genericpath.py", line 30, in isfile', '      st = os.stat(path)', '  TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType', '  ----------------------------------------', '  ERROR: Failed building wheel for markupsafe', '    ERROR: Command errored out with exit status 1:', '     command: \'c:\\users\\783046\\.virtualenvs\\angluar_flask_191215-vyaqho2b\\scripts\\python.exe\' -u -c \'import sys, setuptools, tokenize; sys.argv[0] = \'"\'"\'C:\\\\Users\\\\783046\\\\AppData\\\\Local\\\\Temp\\\\pip-install-09p8hb8p\\\\markupsafe\\\\setup.py\'"\'"\'; __file__=\'"\'"\'C:\\\\Users\\\\783046\\\\AppData\\\\Local\\\\Temp\\\\pip-install-09p8hb8p\\\\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\\783046\\AppData\\Local\\Temp\\pip-record-dmtlrjiq\\install-record.txt\' --single-version-externally-managed --compile --install-headers \'c:\\users\\783046\\.virtualenvs\\angluar_flask_191215-vyaqho2b\\include\\site\\python3.8\\markupsafe\'', '         cwd: C:\\Users\\783046\\AppData\\Local\\Temp\\pip-install-09p8hb8p\\markupsafe\\', '    Complete output (79 lines):', '    running install', '    running build', '    running build_py', '    creating build', '    creating build\\lib.win32-3.8', '    creating build\\lib.win32-3.8\\markupsafe', '    copying src\\markupsafe\\_compat.py -> build\\lib.win32-3.8\\markupsafe', '    copying src\\markupsafe\\_constants.py -> build\\lib.win32-3.8\\markupsafe', '    copying src\\markupsafe\\_native.py -> build\\lib.win32-3.8\\markupsafe', '    copying src\\markupsafe\\__init__.py -> build\\lib.win32-3.8\\markupsafe', '    running egg_info', '    writing src\\MarkupSafe.egg-info\\PKG-INFO', '    writing dependency_links to src\\MarkupSafe.egg-info\\dependency_links.txt', '    writing top-level names to src\\MarkupSafe.egg-info\\top_level.txt', "    reading manifest file 'src\\MarkupSafe.egg-info\\SOURCES.txt'", "    reading manifest template 'MANIFEST.in'", "    no previously-included directories found matching 'docs\\_build'", "    warning: no previously-included files matching '*.py[co]' found anywhere in distribution", "    writing manifest file 'src\\MarkupSafe.egg-info\\SOURCES.txt'", '    copying src\\markupsafe\\_speedups.c -> build\\lib.win32-3.8\\markupsafe', '    warning: build_py: byte-compiling is disabled, skipping.', '    ', '    running build_ext', "    building 'markupsafe._speedups' extension", '    Traceback (most recent call last):', '      File "<string>", line 1, in <module>', '      File "C:\\Users\\783046\\AppData\\Local\\Temp\\pip-install-09p8hb8p\\markupsafe\\setup.py", line 105, in <module>', '        run_setup(True)', '      File "C:\\Users\\783046\\AppData\\Local\\Temp\\pip-install-09p8hb8p\\markupsafe\\setup.py", line 53, in run_setup', '        setup(', '      File "c:\\users\\783046\\.virtualenvs\\angluar_flask_191215-vyaqho2b\\lib\\site-packages\\setuptools\\__init__.py", line 145, in setup', '        return distutils.core.setup(**attrs)', '      File "C:\\Users\\783046\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\distutils\\core.py", line 148, in setup', '        dist.run_commands()', '      File "C:\\Users\\783046\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\distutils\\dist.py", line 966, in run_commands', '        self.run_command(cmd)', '      File "C:\\Users\\783046\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\distutils\\dist.py", line 985, in run_command', '        cmd_obj.run()', '      File "c:\\users\\783046\\.virtualenvs\\angluar_flask_191215-vyaqho2b\\lib\\site-packages\\setuptools\\command\\install.py", line 61, in run', '        return orig.install.run(self)', '      File "C:\\Users\\783046\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\distutils\\command\\install.py", line 545, in run', "        self.run_command('build')", '      File "C:\\Users\\783046\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\distutils\\cmd.py", line 313, in run_command', '        self.distribution.run_command(command)', '      File "C:\\Users\\783046\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\distutils\\dist.py", line 985, in run_command', '        cmd_obj.run()', '      File "C:\\Users\\783046\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\distutils\\command\\build.py", line 135, in run', '        self.run_command(cmd_name)', '      File "C:\\Users\\783046\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\distutils\\cmd.py", line 313, in run_command', '        self.distribution.run_command(command)', '      File "C:\\Users\\783046\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\distutils\\dist.py", line 985, in run_command', '        cmd_obj.run()', '      File "C:\\Users\\783046\\AppData\\Local\\Temp\\pip-install-09p8hb8p\\markupsafe\\setup.py", line 36, in run', '        build_ext.run(self)', '      File "c:\\users\\783046\\.virtualenvs\\angluar_flask_191215-vyaqho2b\\lib\\site-packages\\setuptools\\command\\build_ext.py", line 84, in run', '        _build_ext.run(self)', '      File "C:\\Users\\783046\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\distutils\\command\\build_ext.py", line 340, in run', '        self.build_extensions()', '      File "C:\\Users\\783046\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\distutils\\command\\build_ext.py", line 449, in build_extensions', '        self._build_extensions_serial()', '      File "C:\\Users\\783046\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\distutils\\command\\build_ext.py", line 474, in _build_extensions_serial', '        self.build_extension(ext)', '      File "C:\\Users\\783046\\AppData\\Local\\Temp\\pip-install-09p8hb8p\\markupsafe\\setup.py", line 42, in build_extension', '        build_ext.build_extension(self, ext)', '      File "c:\\users\\783046\\.virtualenvs\\angluar_flask_191215-vyaqho2b\\lib\\site-packages\\setuptools\\command\\build_ext.py", line 205, in build_extension', '        _build_ext.build_extension(self, ext)', '      File "C:\\Users\\783046\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\distutils\\command\\build_ext.py", line 528, in build_extension', '        objects = self.compiler.compile(sources,', '      File "C:\\Users\\783046\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\distutils\\_msvccompiler.py", line 360, in compile', '        self.initialize()', '      File "C:\\Users\\783046\\AppData\\Local\\Programs\\Python\\Python38-32\\Lib\\distutils\\_msvccompiler.py", line 253, in initialize', '        vc_env = _get_vc_env(plat_spec)', '      File "c:\\users\\783046\\.virtualenvs\\angluar_flask_191215-vyaqho2b\\lib\\site-packages\\setuptools\\msvc.py", line 171, in msvc14_get_vc_env', '        return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()', '      File "c:\\users\\783046\\.virtualenvs\\angluar_flask_191215-vyaqho2b\\lib\\site-packages\\setuptools\\msvc.py", line 1620, in return_env', '        if self.vs_ver >= 14 and isfile(self.VCRuntimeRedist):', '      File "c:\\users\\783046\\.virtualenvs\\angluar_flask_191215-vyaqho2b\\lib\\genericpath.py", line 30, in isfile', '        st = os.stat(path)', '    TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType', '    ----------------------------------------', 'ERROR: Command errored out with exit status 1: \'c:\\users\\783046\\.virtualenvs\\angluar_flask_191215-vyaqho2b\\scripts\\python.exe\' -u -c \'import sys, setuptools, tokenize; sys.argv[0] = \'"\'"\'C:\\\\Users\\\\783046\\\\AppData\\\\Local\\\\Temp\\\\pip-install-09p8hb8p\\\\markupsafe\\\\setup.py\'"\'"\'; __file__=\'"\'"\'C:\\\\Users\\\\783046\\\\AppData\\\\Local\\\\Temp\\\\pip-install-09p8hb8p\\\\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\\783046\\AppData\\Local\\Temp\\pip-record-dmtlrjiq\\install-record.txt\' --single-version-externally-managed --compile --install-headers \'c:\\users\\783046\\.virtualenvs\\angluar_flask_191215-vyaqho2b\\include\\site\\python3.8\\markupsafe\' Check the logs for full command output.']
ERROR: ERROR: Package installation failed...
     ================================ 0/1 - 00:00:04

有什么主意吗?我已经用谷歌搜索了,但到目前为止没有帮助。

2 个答案:

答案 0 :(得分:0)

分别安装MarkupSafe,然后重试。

答案 1 :(得分:0)

如果您使用Windows 10,请安装所需的SDK文件,然后重试。

https://developer.microsoft.com/en-us/windows/downloads/sdk-archive