не все модули toga были установлены из-за ошибки во время установки

#python #runtime-error

#python #время выполнения-ошибка

Вопрос:

когда я попытался установить toga с помощью pip install toga, он установился, но выдал мне ошибку:

   Installed:
    3 package(s) to packages.config projects
Traceback (most recent call last):
  File "toolsgeninteropgeninterop.py", line 292, in <module>
    sys.exit(main())
  File "toolsgeninteropgeninterop.py", line 272, in main
    python_h = preprocess_python_headers()
  File "toolsgeninteropgeninterop.py", line 192, in preprocess_python_headers
    for line in _check_output(cmd).splitlines():
  File "toolsgeninteropgeninterop.py", line 41, in _check_output
    output = subprocess.check_output(*args, **kwargs)
  File "c:userscfastappdatalocalprogramspythonpython37-32libsubprocess.py", line 389, in check_output
    **kwargs).stdout
  File "c:userscfastappdatalocalprogramspythonpython37-32libsubprocess.py", line 466, in run
    with Popen(*popenargs, **kwargs) as process:
  File "c:userscfastappdatalocalprogramspythonpython37-32libsubprocess.py", line 769, in __init__
    restore_signals, start_new_session)
  File "c:userscfastappdatalocalprogramspythonpython37-32libsubprocess.py", line 1172, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:UserscfastAppDataLocalTemppip-install-fep_tzdypythonnetsetup.py", line 405, in <module>
    zip_safe=False,
  File "c:userscfastappdatalocalprogramspythonpython37-32libsite-packagessetuptools__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "c:userscfastappdatalocalprogramspythonpython37-32libdistutilscore.py", line 148, in setup
    dist.run_commands()
  File "c:userscfastappdatalocalprogramspythonpython37-32libdistutilsdist.py", line 966, in run_commands
    self.run_command(cmd)
  File "c:userscfastappdatalocalprogramspythonpython37-32libdistutilsdist.py", line 985, in run_command
    cmd_obj.run()
  File "c:userscfastappdatalocalprogramspythonpython37-32libsite-packagessetuptoolscommandinstall.py", line 61, in run
    return orig.install.run(self)
  File "c:userscfastappdatalocalprogramspythonpython37-32libdistutilscommandinstall.py", line 545, in run
    self.run_command('build')
  File "c:userscfastappdatalocalprogramspythonpython37-32libdistutilscmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "c:userscfastappdatalocalprogramspythonpython37-32libdistutilsdist.py", line 985, in run_command
    cmd_obj.run()
  File "c:userscfastappdatalocalprogramspythonpython37-32libdistutilscommandbuild.py", line 135, in run
    self.run_command(cmd_name)
  File "c:userscfastappdatalocalprogramspythonpython37-32libdistutilscmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "c:userscfastappdatalocalprogramspythonpython37-32libdistutilsdist.py", line 985, in run_command
    cmd_obj.run()
  File "c:userscfastappdatalocalprogramspythonpython37-32libdistutilscommandbuild_ext.py", line 339, in run
    self.build_extensions()
  File "c:userscfastappdatalocalprogramspythonpython37-32libdistutilscommandbuild_ext.py", line 448, in build_extensions
    self._build_extensions_serial()
  File "c:userscfastappdatalocalprogramspythonpython37-32libdistutilscommandbuild_ext.py", line 473, in _build_extensions_serial
    self.build_extension(ext)
  File "C:UserscfastAppDataLocalTemppip-install-fep_tzdypythonnetsetup.py", line 191, in build_extension
    subprocess.check_call([sys.executable, geninterop, interop_file])
  File "c:userscfastappdatalocalprogramspythonpython37-32libsubprocess.py", line 341, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['c:\users\cfast\appdata\local\programs\python\python37-32\python.exe', 'tools\geninterop\geninterop.py', 'src\runtime

----------------------------------------
Command "c:userscfastappdatalocalprogramspythonpython37-32python.exe -u -c "import setuptools, tokenize;__file__='C:\Users\cfast\AppData\Local\Temp\pip-install-'rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:UserscfastAppDataLocalTemppip-record-crjqtxreinstall-record.txt --single-version-extell-fep_tzdypythonnet
  

мой код на python:

 import toga


class Freedom(toga.App):
    def startup(self):
        self.main_window = toga.MainWindow(self.name)
        self.main_window.app = self

        box = toga.Box()

        self.main_window.content = box
        self.main_window.show()


def main():
    return Freedom('Freedom Units', 'org.pybee.freedom')

if __name__ == '__main__':
    main()
  

но когда я запускаю свой код, он выдает мне это:

 Traceback (most recent call last):
  File "c:projectsappseclipsetempCodeRunnerFile.py", line 19, in <module>    
main()
  File "c:projectsappseclipsetempCodeRunnerFile.py", line 16, in main
    return Freedom('Freedom Units', 'org.pybee.freedom')  File 
"C:UserscfastAppDataLocalProgramsPythonPython37-32libsite- 
packagestogaapp.py", line 53, in __init__
    self.factory = get_platform_factory(factory)  File 
"C:UserscfastAppDataLocalProgramsPythonPython37-32libsite- 
packagestogaplatform.py", line 42, in get_platform_factory
    from toga_winforms import factoryModuleNotFoundError: No module named 
'toga_winforms'
  

затем я попытался установить toga_winforms с помощью pip install toga_Winforms
но это выдало мне ту же первую ошибку, я пытался искать решения, но ничего не получил.
приветствуется любая помощь.

Комментарии:

1. Этот подпроцесс завершается с ошибкой, попробуйте выяснить причину.. `Command ‘[‘c:\users\cfast\appdata\local\programs\python\python37-32\python.exe ‘, ‘tools\geninterop\geninterop.py ‘, ‘src \runtime`

2. как. можете ли вы хотя бы дать мне какие-нибудь инструкции, это было бы здорово ^^