标题:Pyinstaller安装失败
只看楼主
Tdd_hh
Rank: 1
等 级:新手上路
帖 子:13
专家分:0
注 册:2020-11-28
结帖率:83.33%
已结贴  问题点数:19 回复次数:2 
Pyinstaller安装失败

报错具体内容
程序代码:
----- 正在安装“pip install -i https://pypi.tuna.tsinghua. Pyinstaller” -----
Looking in indexes: https://pypi.tuna.tsinghua. already satisfied: pip in e:\visual studio工具箱\python37_64\lib\site-packages (20.3.3)
Requirement already satisfied: install in e:\visual studio工具箱\python37_64\lib\site-packages (1.3.4)
Collecting Pyinstaller
  Using cached https://pypi.tuna.tsinghua. (3.5 MB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
ERROR: Exception:
Traceback (most recent call last):
  File "E:\Visual Studio工具箱\Python37_64\lib\site-packages\pip\_internal\cli\base_command.py", line 224, in _main
    status = self.run(options, args)
  File "E:\Visual Studio工具箱\Python37_64\lib\site-packages\pip\_internal\cli\req_command.py", line 180, in wrapper
    return func(self, options, args)
  File "E:\Visual Studio工具箱\Python37_64\lib\site-packages\pip\_internal\commands\install.py", line 321, in run
    reqs, check_supported_wheels=not options.target_dir
  File "E:\Visual Studio工具箱\Python37_64\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 122, in resolve
    requirements, max_rounds=try_to_avoid_resolution_too_deep,
  File "E:\Visual Studio工具箱\Python37_64\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 445, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "E:\Visual Studio工具箱\Python37_64\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 339, in resolve
    failure_causes = self._attempt_to_pin_criterion(name, criterion)
  File "E:\Visual Studio工具箱\Python37_64\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 207, in _attempt_to_pin_criterion
    criteria = self._get_criteria_to_update(candidate)
  File "E:\Visual Studio工具箱\Python37_64\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 198, in _get_criteria_to_update
    for r in self._p.get_dependencies(candidate):
  File "E:\Visual Studio工具箱\Python37_64\lib\site-packages\pip\_internal\resolution\resolvelib\provider.py", line 172, in get_dependencies
    for r in candidate.iter_dependencies(with_requires)
  File "E:\Visual Studio工具箱\Python37_64\lib\site-packages\pip\_internal\resolution\resolvelib\provider.py", line 171, in <listcomp>
    r
  File "E:\Visual Studio工具箱\Python37_64\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 257, in iter_dependencies
    requires = self.dist.requires() if with_requires else ()
  File "E:\Visual Studio工具箱\Python37_64\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 239, in dist
    self._prepare()
  File "E:\Visual Studio工具箱\Python37_64\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 226, in _prepare
    dist = self._prepare_distribution()
  File "E:\Visual Studio工具箱\Python37_64\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 319, in _prepare_distribution
    self._ireq, parallel_builds=True,
  File "E:\Visual Studio工具箱\Python37_64\lib\site-packages\pip\_internal\operations\prepare.py", line 480, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
  File "E:\Visual Studio工具箱\Python37_64\lib\site-packages\pip\_internal\operations\prepare.py", line 524, in _prepare_linked_requirement
    req, self.req_tracker, self.finder, self.build_isolation,
  File "E:\Visual Studio工具箱\Python37_64\lib\site-packages\pip\_internal\operations\prepare.py", line 88, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(finder, build_isolation)
  File "E:\Visual Studio工具箱\Python37_64\lib\site-packages\pip\_internal\distributions\sdist.py", line 39, in prepare_distribution_metadata
    self._setup_isolation(finder)
  File "E:\Visual Studio工具箱\Python37_64\lib\site-packages\pip\_internal\distributions\sdist.py", line 97, in _setup_isolation
    reqs = backend.get_requires_for_build_wheel()
  File "E:\Visual Studio工具箱\Python37_64\lib\site-packages\pip\_vendor\pep517\wrappers.py", line 178, in get_requires_for_build_wheel
    'config_settings': config_settings
  File "E:\Visual Studio工具箱\Python37_64\lib\site-packages\pip\_vendor\pep517\wrappers.py", line 284, in _call_hook
    raise BackendUnavailable(data.get('traceback', ''))
pip._vendor.pep517.wrappers.BackendUnavailable: Traceback (most recent call last):
  File "E:\Visual Studio工具箱\Python37_64\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 86, in _build_backend
    obj = import_module(mod_path)
  File "E:\Visual Studio工具箱\Python37_64\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'setuptools'
----- 安装“pip install -i https://pypi.tuna.tsinghua. Pyinstaller”失败 -----
搜索更多相关主题的帖子: studio 工具箱 lib line File 
2021-01-08 22:11
古123
Rank: 9Rank: 9Rank: 9
等 级:贵宾
威 望:14
帖 子:219
专家分:1098
注 册:2017-2-5
得分:19 
要不要试试先安装setuptools?

[此贴子已经被作者于2021-1-9 15:48编辑过]

2021-01-09 11:42
Tdd_hh
Rank: 1
等 级:新手上路
帖 子:13
专家分:0
注 册:2020-11-28
得分:0 
回复 2楼 古123
首先安装“pip install pywin32”
其次“pip install wheel”
最后安装“pip install pyistaller

找了老半天,我这个应该是多版本的问题
2021-01-09 16:00



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-504577-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.059930 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved