He knows most who speaks least.
大智若愚
Updated time: 06/23 2026.
Python 环境与项目包:myalloy / mymetal 安装,dft 虚拟环境。
myalloy 和 mymetal 安装
myalloy
pip install git+https://github.com/BinglunYin/myalloy_package.git
mymetal
pip install -e .
~/opt/bin/python3 pip3
dft
ln -s $(which python3) ~/opt/bin/python3
ln -s $(which pip3) ~/opt/bin/pip3
# change the activate
Add Font
mkdir -p ~/.font
把字体放在这个文件夹下
# https://github.com/matomo-org/travis-scripts/tree/master
# 确认 Arial 字体真正被系统识别
fc-cache -fv ~/.fonts
fc-list | grep -i arial
# 输出:/home/your_user/.fonts/Arial.ttf: Arial:style=Regular
# maybe useless
vi ~/.config/matplotlib/matplotlibrc
font.family: Arial
# 确认 matplotlib 能识别该字体
import matplotlib.font_manager as fm
# 打印所有可用字体名称
for font in fm.findSystemFonts(fontpaths=['/fullname/.fonts']):
prop = fm.FontProperties(fname=font)
print(f"{font} --> {prop.get_name()}")
# 清除 matplotlib 字体缓存(必要)
rm -f ~/.cache/matplotlib/fontlist-v*.json
# 重新运行 Python 测试代码
Python
dft
# 1. 在python官网下载3.11.7版本,并安装。现在which python就应该是刚刚安装的目录下的了。
# 2. creare a virtual environment.
python -m venv "/c/Users/louis/mysoft/env/pyenv/dft"
# 3. 在bash中激活环境
source "/c/Users/louis/mysoft/env/pyenv/dft/Scripts/activate"
# 4. 在.bashrc中添加别名
alias dft="source /c/Users/louis/mysoft/env/pyenv/dft/Scripts/activate"
Please indicate the source when reprinting. Please verify the citation sources in the article and point out any errors or unclear expressions.