Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miniforge环境下建立的python3.10虚拟环境中,tkinter界面中的中文显示为unicode编码。In the python3.10 virtual environment created under Miniforge, the Chinese in the tkinter interface is displayed in unicode. #67

Open
mrcedar-git opened this issue Dec 31, 2024 · 4 comments
Labels

Comments

@mrcedar-git
Copy link

Comment:

Miniforge环境下建立的python3.10虚拟环境中,tkinter界面中的中文显示为unicode编码

您好,我一直被一个问题困扰,希望能得到指点,不胜感激:我是在Rockylinux9.5上安装的miniforge环境,并在该环境下建立的python3.10虚拟环境,运行python -m tkinter 正常,但tkinter界面中的中文显示为unicode编码,如\u4065\u5634。base环境和其他环境都一样。怎么让它显示成中文啊?

In the python3.10 virtual environment created under Miniforge, the Chinese in the tkinter interface is displayed in unicode.

Hi, I've been troubled by a problem, I hope I can get your guidance, thanks a lot: I installed miniforge environment on Rockylinux9.5, and set up python3.10 virtual environment under the environment, running python -m tkinter is normal, However, the Chinese in the tkinter interface is displayed as unicode encoding, such as \u4065\u5634. base environment and other environments are the same. How to make it display in Chinese?

@hmaarrfk
Copy link

hmaarrfk commented Jan 4, 2025

can you please provide screenshots?

@mrcedar-git
Copy link
Author

mrcedar-git commented Jan 5, 2025

can you please provide screenshots?您能提供屏幕截图吗?
Of course! Screenshot as follows:
Image
Image
Image
The Chinese text in this picture is "name, password".名字、密码

tokens used: 150, model: Ollama (qwen2.5:latest)

The information about the mamba environment is as follows:

(base) [wang@192 UVR5.6]$ mamba info

      mamba version : 1.5.11
 active environment : base
active env location : /home/wang/miniforge3
        shell level : 1
   user config file : /home/wang/.condarc

populated config files : /home/wang/miniforge3/.condarc
/home/wang/.condarc
conda version : 24.11.0
conda-build version : not installed
python version : 3.12.8.final.0
solver : libmamba (default)
virtual packages : __archspec=1=haswell
__conda=24.11.0=0
__cuda=12.4=0
__glibc=2.34=0
__linux=5.14.0=0
__unix=0=0
base environment : /home/wang/miniforge3 (writable)
conda av data dir : /home/wang/miniforge3/etc/conda
conda av metadata url : None
channel URLs : https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/linux-64
https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/noarch
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/noarch
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/noarch
https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64
https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch
https://conda.anaconda.org/conda-forge/linux-64
https://conda.anaconda.org/conda-forge/noarch
package cache : /home/wang/miniforge3/pkgs
/home/wang/.conda/pkgs
envs directories : /home/wang/miniforge3/envs
/home/wang/.conda/envs
platform : linux-64
user-agent : conda/24.11.0 requests/2.32.3 CPython/3.12.8 Linux/5.14.0-503.16.1.el9_5.x86_64 rocky/9.5 glibc/2.34 solver/libmamba conda-libmamba-solver/24.9.0 libmambapy/1.5.11
UID:GID : 1000:1000
netrc file : None
offline mode : False

(base) [wang@192 UVR5.6]$ mamba list
packages in environment at /home/wang/miniforge3:

Name Version Build Channel
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 2_gnu conda-forge
archspec 0.2.3 pyhd8ed1ab_0 conda-forge
bash-completion 2.11 ha770c72_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
boltons 24.0.0 pyhd8ed1ab_1 conda-forge
brotli-python 1.1.0 py312h2ec8cdc_2 conda-forge
bzip2 1.0.8 h4bc722e_7 conda-forge
c-ares 1.34.3 hb9d3cd8_1 conda-forge
ca-certificates 2024.11.26 h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
certifi 2024.12.14 py312h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
cffi 1.17.1 py312h06ac9bb_0 conda-forge
charset-normalizer 3.4.0 pyhd8ed1ab_1 conda-forge
colorama 0.4.6 pyhd8ed1ab_1 conda-forge
conda 24.11.0 py312h7900ff3_0 conda-forge
conda-bash-completion 1.7 ha770c72_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
conda-libmamba-solver 24.9.0 pyhd8ed1ab_0 conda-forge
conda-package-handling 2.4.0 pyha770c72_1 conda-forge
conda-package-streaming 0.11.0 pyhd8ed1ab_0 conda-forge
distro 1.9.0 pyhd8ed1ab_0 conda-forge
fmt 11.0.2 h434a139_0 conda-forge
frozendict 2.4.6 py312h66e93f0_0 conda-forge
h2 4.1.0 pyhd8ed1ab_1 conda-forge
hpack 4.0.0 pyhd8ed1ab_1 conda-forge
hyperframe 6.0.1 pyhd8ed1ab_1 conda-forge
idna 3.10 pyhd8ed1ab_1 conda-forge
jsonpatch 1.33 pyhd8ed1ab_1 conda-forge
jsonpointer 3.0.0 py312h7900ff3_1 conda-forge
keyutils 1.6.1 h166bdaf_0 conda-forge
krb5 1.21.3 h659f571_0 conda-forge
ld_impl_linux-64 2.43 h712a8e2_2 conda-forge
libarchive 3.7.7 h4585015_2 conda-forge
libcurl 8.10.1 hbbe4b11_0 conda-forge
libedit 3.1.20191231 he28a2e2_2 conda-forge
libev 4.33 hd590300_2 conda-forge
libexpat 2.6.4 h5888daf_0 conda-forge
libffi 3.4.2 h7f98852_5 conda-forge
libgcc 14.2.0 h77fa898_1 conda-forge
libgcc-ng 14.2.0 h69a702a_1 conda-forge
libgomp 14.2.0 h77fa898_1 conda-forge
libiconv 1.17 hd590300_2 conda-forge
liblzma 5.6.3 hb9d3cd8_1 conda-forge
libmamba 1.5.11 hf72d635_0 conda-forge
libmambapy 1.5.11 py312hf3f0a4e_0 conda-forge
libnghttp2 1.64.0 h161d5f1_0 conda-forge
libnsl 2.0.1 hd590300_0 conda-forge
libsolv 0.7.30 h3509ff9_0 conda-forge
libsqlite 3.47.2 hee588c1_0 conda-forge
libssh2 1.11.1 hf672d98_0 conda-forge
libstdcxx 14.2.0 hc0a3c3a_1 conda-forge
libstdcxx-ng 14.2.0 h4852527_1 conda-forge
libuuid 2.38.1 h0b41bf4_0 conda-forge
libxcrypt 4.4.36 hd590300_1 conda-forge
libxml2 2.13.5 h0d44e9d_1 conda-forge
libzlib 1.3.1 hb9d3cd8_2 conda-forge
lz4-c 1.10.0 h5888daf_1 conda-forge
lzo 2.10 hd590300_1001 conda-forge
mamba 1.5.11 py312h9460a1c_0 conda-forge
mamba-bash-completion 1.0 ha770c72_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
menuinst 2.2.0 py312h7900ff3_0 conda-forge
ncurses 6.5 he02047a_1 conda-forge
openssl 3.4.0 hb9d3cd8_0 conda-forge
packaging 24.2 pyhd8ed1ab_2 conda-forge
pip 24.3.1 pyh8b19718_0 conda-forge
pip-autoremove 0.10.0 pypi_0 pypi
platformdirs 4.3.6 pyhd8ed1ab_1 conda-forge
pluggy 1.5.0 pyhd8ed1ab_1 conda-forge
pybind11-abi 4 hd8ed1ab_3 conda-forge
pycosat 0.6.6 py312h66e93f0_2 conda-forge
pycparser 2.22 pyh29332c3_1 conda-forge
pysocks 1.7.1 pyha55dd90_7 conda-forge
python 3.12.8 h9e4cc4f_1_cpython conda-forge
python_abi 3.12 5_cp312 conda-forge
readline 8.2 h8228510_1 conda-forge
reproc 14.2.5.post0 hb9d3cd8_0 conda-forge
reproc-cpp 14.2.5.post0 h5888daf_0 conda-forge
requests 2.32.3 pyhd8ed1ab_1 conda-forge
ruamel.yaml 0.18.6 py312h66e93f0_1 conda-forge
ruamel.yaml.clib 0.2.8 py312h66e93f0_1 conda-forge
setuptools 75.6.0 pyhff2d567_1 conda-forge
tk 8.6.13 noxft_h4845f30_101 conda-forge
tqdm 4.67.1 pyhd8ed1ab_0 conda-forge
truststore 0.10.0 pyhd8ed1ab_0 conda-forge
tzdata 2024b hc8b5060_0 conda-forge
urllib3 2.2.3 pyhd8ed1ab_1 conda-forge
wheel 0.45.1 pyhd8ed1ab_1 conda-forge
yaml-cpp 0.8.0 h59595ed_0 conda-forge
zstandard 0.23.0 py312hef9b889_1 conda-forge
zstd 1.5.6 ha6fb4c9_0 conda-forge

@hmaarrfk hmaarrfk transferred this issue from conda-forge/miniforge Jan 5, 2025
@hmaarrfk
Copy link

hmaarrfk commented Jan 5, 2025

I've transfered it over to the TK feedstock. But My feeling is that this isn't so much an installation issue but rather how Tk + python handle codepages in Windows.

Sorry I don't know much about windows and tk.

@mrcedar-git
Copy link
Author

Thank you very much! I'm looking forward to finding the cause and solving this problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants