FPGAwars / apio

:seedling: Open source ecosystem for open FPGA boards
https://github.com/FPGAwars/apio/wiki
GNU General Public License v2.0
794 stars 136 forks source link

Fatal Python error: init_sys_streams: can't initialize sys standard streams #334

Closed jiapei100 closed 9 months ago

jiapei100 commented 9 months ago

Failed to build the 1st demo leds using command apio build. It looks a Python issue??? I'm working under Ubuntu 22.04.3, using Python 3.10.12.

➜  leds apio build
(DEBUG) Profile path: ~/.apio/profile.json
(DEBUG) Home_dir: ~/.apio

PATH: ~/.apio/packages/tools-oss-cad-suite/bin:~/.apio/packages/tools-oss-cad-suite/lib:......:etc.

[Thu Dec  7 04:46:12 2023] Processing icestick
---------------------------------------------------------------------------------------------------------------------------------------------------------------
nextpnr-ice40 --hx1k --package tq144 --json hardware.json --asc hardware.asc --pcf leds.pcf -q
Fatal Python error: init_sys_streams: can't initialize sys standard streams
Python runtime state: core initialized
Traceback (most recent call last):
File "/usr/lib/python3.10/io.py", line 54, in <module>
ImportError: cannot import name 'text_encoding' from 'io' (unknown location)
scons: *** [hardware.asc] Error 1

Thank you ...

jiapei100 commented 9 months ago

Problem solved by sorting out pyenv... So weird...