Skip to content

mac 找不到matplotlibrc #7

Description

@welyt

FileNotFoundError Traceback (most recent call last)
/Users/bytedance/work/project/NB20/wgs_plot.ipynb 单元格 17 in ()
4 from sklearn.preprocessing import StandardScaler, MinMaxScaler
5 from mplfonts.bin.cli import init
----> 6 init()
7 sample_info = sample_info.set_index('sample_id')
8 z_df_T = StandardScaler().set_output(transform='pandas').fit_transform(X=meth_df.transpose())

File ~/work/app/miniconda3/lib/python3.9/site-packages/mplfonts/bin/cli.py:18, in init()
16 """To set default cjk fonts and put into use"""
17 install_fonts()
---> 18 update_custom_rc()
19 shutil.rmtree(matplotlib.get_cachedir())

File ~/work/app/miniconda3/lib/python3.9/site-packages/mplfonts/util/manage.py:46, in update_custom_rc(custom_rc)
40 os.remove(cache_rc_fp)
41 print(
42 f"Warning: The {matplotlib.matplotlib_fname()} "
43 f"already exists, renamed it to {backup_fp}"
44 )
---> 46 shutil.copy(custom_rc, cache_rc_fp)

File ~/work/app/miniconda3/lib/python3.9/shutil.py:427, in copy(src, dst, follow_symlinks)
425 if os.path.isdir(dst):
426 dst = os.path.join(dst, os.path.basename(src))
--> 427 copyfile(src, dst, follow_symlinks=follow_symlinks)
428 copymode(src, dst, follow_symlinks=follow_symlinks)
429 return dst

File ~/work/app/miniconda3/lib/python3.9/shutil.py:266, in copyfile(src, dst, follow_symlinks)
264 with open(src, 'rb') as fsrc:
265 try:
--> 266 with open(dst, 'wb') as fdst:
267 # macOS
268 if _HAS_FCOPYFILE:
269 try:

FileNotFoundError: [Errno 2] No such file or directory: '/Users/bytedance/.matplotlib/matplotlibrc'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions