ancon安装matplotlibrc的v3.1.3版本
时间: 2024-03-12 17:49:37 浏览: 43
要安装matplotlibrc的v3.1.3版本,可以按照以下步骤进行操作:
1. 首先确保已经安装了Anaconda,可以在命令行中输入`conda --version`来检查版本。
2. 接下来创建一个新的conda环境,在命令行中输入以下命令:
```
conda create --name mpl_env python=3.7 matplotlib=3.1.3
```
这里我们创建了一个名为mpl_env的conda环境,并指定了python版本为3.7,matplotlib版本为3.1.3。
3. 激活conda环境,在命令行中输入以下命令:
```
conda activate mpl_env
```
4. 下载matplotlibrc文件,并将其保存到matplotlib配置路径下。可以在命令行中输入以下命令来查找matplotlib配置路径:
```
python -c "import matplotlib; print(matplotlib.matplotlib_fname())"
```
这会输出matplotlib的配置路径,例如:
```
/Users/username/anaconda3/envs/mpl_env/lib/python3.7/site-packages/matplotlib/mpl-data/matplotlibrc
```
将下载的matplotlibrc文件保存到上述路径下即可。
5. 确认matplotlibrc文件已经被正确加载。可以在Python交互环境中输入以下代码来检查:
```
import matplotlib
print(matplotlib.rcParams)
```
这会输出当前matplotlib的配置,其中应该包含我们刚才设置的配置。
以上步骤完成后,就成功安装了matplotlibrc的v3.1.3版本,并将其应用到了mpl_env环境中。
相关推荐
![exe](https://img-home.csdnimg.cn/images/20210720083343.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![xlsx](https://img-home.csdnimg.cn/images/20210720083732.png)
![xls](https://img-home.csdnimg.cn/images/20210720083658.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)