Skip to content

Python runtime is configured incorrectly on Windows. #7

@IVLIVS-III

Description

@IVLIVS-III

@IVLIVS-III The example project still does not work after the fix. Here is the log:

Launching lib\main.dart on Windows in debug mode...
lib\main.dart:1
√  Built build\windows\runner\Debug\example.exe.
Connecting to VM Service at ws://127.0.0.1:50354/PgO4aU0b_qk=/ws
Could not find platform independent libraries <prefix>
Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = (not set)
  program name = 'python'
  isolated = 0
  environment = 1
  user site = 1
  safe_path = 0
  import site = 1
  is in build tree = 0
  stdlib dir = 'C:\Users\Anton\Documents\Flutter\dart_python_ffi\packages\python_ffi\example\Lib'
  sys._base_executable = 'C:\\Users\\Anton\\Documents\\Flutter\\dart_python_ffi\\packages\\python_ffi\\example\\build\\windows\\runner\\Debug\\example.exe'
  sys.base_prefix = 'C:\\Users\\Anton\\Documents\\Flutter\\dart_python_ffi\\packages\\python_ffi\\example'
  sys.base_exec_prefix = 'C:\\Users\\Anton\\Documents\\Flutter\\dart_python_ffi\\packages\\python_ffi\\example'
  sys.platlibdir = 'DLLs'
  sys.executable = 'C:\\Users\\Anton\\Documents\\Flutter\\dart_python_ffi\\packages\\python_ffi\\example\\build\\windows\\runner\\Debug\\example.exe'
  sys.prefix = 'C:\\Users\\Anton\\Documents\\Flutter\\dart_python_ffi\\packages\\python_ffi\\example'
  sys.exec_prefix = 'C:\\Users\\Anton\\Documents\\Flutter\\dart_python_ffi\\packages\\python_ffi\\example'
  sys.path = [
    'C:\\Users\\Anton\\Documents\\Flutter\\dart_python_ffi\\packages\\python_ffi\\example\\build\\windows\\runner\\Debug\\python311.zip',
    'C:\\Users\\Anton\\Documents\\Flutter\\dart_python_ffi\\packages\\python_ffi\\example',
    'C:\\Users\\Anton\\Documents\\Flutter\\dart_python_ffi\\packages\\python_ffi\\example\\Lib',
    'C:\\Users\\Anton\\Documents\\Flutter\\dart_python_ffi\\packages\\python_ffi\\example\\build\\windows\\runner\\Debug',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00000bfc (most recent call first):
  <no Python frame>
Lost connection to device.
Exited (sigterm)

Originally posted by @pushkinman in #5 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedThis issue will be addressed later.bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions