<?xml version="1.0" encoding="utf-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><title>Chuanrui の 初见之旅</title><link>https://blog.1314.cool/</link><description>心若浮沉，浅笑安然</description><item><title>虚拟机磁盘大小变更后的Ubuntu动态分区调整</title><link>https://blog.1314.cool/post/80.html</link><description>&lt;p data-source-line=&quot;1&quot;&gt;家人们，今天我们来分享一下关于虚拟机磁盘大小变更后，在Ubuntu操作系统中如何进行动态分区调整的技巧。随着虚拟化技术的发展，虚拟机已经成为许多开发者和系统管理员的首选工具之一。在使用虚拟机过程中，可能会遇到需要扩展磁盘容量的情况，而Ubuntu作为一种常见的操作系统，我们将介绍如何动态调整分区以适应磁盘大小的变更。&lt;/p&gt;
&lt;p data-source-line=&quot;3&quot;&gt;pv、lv、vg 介绍&lt;br&gt;PV（Phsical Volume，物理卷），PV是VG的组成部分，由分区构成，多块盘的时候，可以把一块盘格式化成一个主分区，然后用这个分区做成一个PV，只有一块盘的时候，可以这块盘的某一个分区做成一个PV，实际上一个PV就一个分区。&lt;br&gt;VG（Volume Group， 卷组），有若干个PV组成，作用就是将PV组成到以前，然后再重新划分空间。&lt;br&gt;LV（Logical Volume，逻辑卷），LV就是从VG中划分出来的卷，LV的使用要比PV灵活的多，可以在空间不够的情况下，增加空间。&lt;br&gt;可以说成是PV就是硬盘,而VG就是管理硬盘的操作系统,而LV就是操作系统分出来的各个分区. PV-&amp;lt;!--autointro--&amp;gt;&lt;/p&gt;
</description><pubDate>Tue, 03 Sep 2024 23:53:14 +0800</pubDate></item><item><title>Linux服务器 自建FRP服务器</title><link>https://blog.1314.cool/post/76.html</link><description>&lt;h1&gt;FRP服务部署&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;FRP&lt;/strong&gt; 是一款专注于内网穿透的高性能反向代理应用，支持TCP、UDP、HTTP、HTTPS等多种协议。通过在具有公网IP的节点上部署FRP服务端，可以将内网服务安全、便捷地暴露到公网，同时提供多项功能特性。&lt;/p&gt;
&lt;h2&gt;服务端部署&lt;/h2&gt;
&lt;h3&gt;Linux部署&lt;/h3&gt;
&lt;h4&gt;1. 创建FRP目录&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;mkdir frp
cd frp&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;2. 下载FRP软件包&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;wget https://github.com/fatedier/frp/releases/download/v0.49.0/frp_0.49.0_linux_amd64.tar.gz&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;如果没有&lt;code&gt;wget&lt;/code&gt;命令：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;CentOS: &lt;code&gt;yum install -y wget&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Ubuntu或Debian: &lt;code&gt;apt install -y wget&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;3. 解压文件&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;tar -zxvf frp_0.49.0_linux_amd64.tar.gz
cd frp_0.49.0_linux_amd64&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;4. 编辑frps.ini文件&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;vim frps.ini&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;编辑以下内容：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ini&quot;&gt;[common]
bind_port = 7000
dashboard_port = 7500
dashboard_user = admin
dashboard_pwd = xxxxxx
vhost_http_port = 80
vhost_https_port = 443
log_file = ./frps.log
log_level = info
log_max_days = 7
authentication_timeout = 900
token = 123123123
max_pool_count = 5
max_ports_per_client = 0&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;保存并退出。&lt;/p&gt;
&lt;h4&gt;5. 开放防火墙端口&lt;/h4&gt;
&lt;p&gt;对于CentOS：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;firewall-cmd --zone=public --add-port=7000/tcp --permanent
firewall-cmd --zone=public --add-port=7500/tcp --permanent
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --zone=public --add-port=443/tcp --permanent
firewall-cmd --reload&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;对于Ubuntu或Debian：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;ufw allow 80
ufw allow 443
ufw allow 7000
ufw allow 7500
ufw enable&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;6. 启动服务&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;正常启动：&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;./frps -c ./frps.ini&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;后台启动并记录日志：&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;
nohup ./frps -c frps.ini &amp;lt;!--autointro--&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;!--autointro--&gt;</description><pubDate>Mon, 20 Nov 2023 22:27:37 +0800</pubDate></item><item><title>修复GitLab中NGINX无法启动的问题</title><link>https://blog.1314.cool/post/73.html</link><description>&lt;h1 data-source-line=&quot;1&quot; id=&quot;h1--gitlab-nginx-&quot;&gt;&lt;a class=&quot;reference-link&quot; name=&quot;修复GitLab中NGINX无法启动的问题&quot;&gt;&lt;/a&gt;&lt;span class=&quot;header-link octicon octicon-link&quot;&gt;&lt;/span&gt;修复GitLab中NGINX无法启动的问题&lt;/h1&gt;&lt;p data-source-line=&quot;3&quot;&gt;在安装GitLab后，当修改了一些配置后执行 &lt;code&gt;sudo gitlab-ctl reconfigure&lt;/code&gt; 后，可能会出现NGINX无法启动的问题。以下是详细的解决方案：&lt;/p&gt;
&lt;h2 data-source-line=&quot;5&quot; id=&quot;h2-u95EEu9898u63CFu8FF0&quot;&gt;&lt;a class=&quot;reference-link&quot; name=&quot;问题描述&quot;&gt;&lt;/a&gt;&lt;span class=&quot;header-link octicon octicon-link&quot;&gt;&lt;/span&gt;问题描述&lt;/h2&gt;&lt;p data-source-line=&quot;7&quot;&gt;执行 &lt;code&gt;sudo gitlab-ctl reconfigure&lt;/code&gt; 后，GitLab中的NGINX无法启动，访问GitLab也失败。执行 &lt;code&gt;sudo gitlab-ctl tail&lt;/code&gt; 后，显示如下错误信息：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;2019-06-28_07:27:25.52035 chpst: fatal: unable to run: /opt/gitlab/embedded/sbin/nginx: file does not exist
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 data-source-line=&quot;13&quot; id=&quot;h2-u89E3u51B3u65B9u6848&quot;&gt;&lt;a class=&quot;reference-link&quot; name=&quot;解决方案&quot;&gt;&lt;/a&gt;&lt;span class=&quot;header-link octicon octicon-link&quot;&gt;&lt;/span&gt;解决方案&lt;/h2&gt;&lt;ol data-source-line=&quot;15&quot;&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;复制&lt;code&gt;gitlab-web&lt;/code&gt;到&lt;code&gt;nginx&lt;/code&gt;路径：&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo cp /opt/gitlab/embedded/sbin/gitlab-web /opt/gitlab/embedded/sbin/nginx
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; 上述命令将&lt;code&gt;gitlab-web&lt;/code&gt;复制到NGINX的路径，以确保启动时能够找到必要的执行文件。&lt;/p&gt;
&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;重新配置GitLab：&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo gitlab-ctl reconfigure
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;重新启动GitLab服务：&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo gitlab-ctl restart
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;检查GitLab服务状态：&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo gitlab-ctl status
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; 确保NGINX已经成功启动。&lt;/p&gt;
&lt;/li&gt;&lt;li&gt;&lt;p&gt;&lt;strong&gt;尝试访问GitLab：&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt; 在浏览器中访问GitLab，确保问题已解决。&lt;/p&gt;
&lt;/li&gt;&lt;/ol&gt;
&lt;h2 data-source-line=&quot;47&quot; id=&quot;h2-u8FDBu4E00u6B65u6B65u9AA4&quot;&gt;&lt;a class=&quot;reference-link&quot; name=&quot;进一步步骤&quot;&gt;&lt;/a&gt;&lt;span class=&quot;header-link octicon octicon-link&quot;&gt;&lt;/span&gt;进一步步骤&lt;/h2&gt;&lt;ul data-source-line=&quot;49&quot;&gt;
&lt;li&gt;&lt;p&gt;如果问题仍然存在，可以查看GitLab的详细日志，获取更多信息：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo gitlab-ctl tail
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;  查看日志文件可帮助进一步定位问题，并采取适当的解决措施。&lt;/p&gt;
&lt;/li&gt;&lt;li&gt;&lt;p&gt;如果NGINX启动后仍然存在问题，可以考虑检查GitLab配置文件中的NGINX相关配置项，确保&amp;lt;!--autointro--&amp;gt;&lt;/p&gt;
&lt;/li&gt;&lt;/ul&gt;
</description><pubDate>Sat, 11 Nov 2023 20:27:20 +0800</pubDate></item><item><title>GitLab 配置 邮件服务器</title><link>https://blog.1314.cool/post/72.html</link><description>&lt;h2 data-source-line=&quot;1&quot; id=&quot;h2--gitlab-&quot;&gt;&lt;a class=&quot;reference-link&quot; name=&quot;在GitLab中配置电子邮件服务器教程&quot;&gt;&lt;/a&gt;&lt;span class=&quot;header-link octicon octicon-link&quot;&gt;&lt;/span&gt;在GitLab中配置电子邮件服务器教程&lt;/h2&gt;&lt;h3 data-source-line=&quot;3&quot; id=&quot;h3-u7B80u4ECB&quot;&gt;&lt;a class=&quot;reference-link&quot; name=&quot;简介&quot;&gt;&lt;/a&gt;&lt;span class=&quot;header-link octicon octicon-link&quot;&gt;&lt;/span&gt;简介&lt;/h3&gt;&lt;p data-source-line=&quot;5&quot;&gt;GitLab是一款广受欢迎的基于Web的Git仓库管理工具，用于团队协作和版本控制。在GitLab中，您可以配置电子邮件服务器，以便进行通知、邀请等操作。以下是如何在GitLab中配置电子邮件服务器的步骤。&lt;/p&gt;
&lt;h3 data-source-line=&quot;7&quot; id=&quot;h3-u51C6u5907u5DE5u4F5C&quot;&gt;&lt;a class=&quot;reference-link&quot; name=&quot;准备工作&quot;&gt;&lt;/a&gt;&lt;span class=&quot;header-link octicon octicon-link&quot;&gt;&lt;/span&gt;准备工作&lt;/h3&gt;&lt;p data-source-line=&quot;9&quot;&gt;在开始配置GitLab之前，请确保您已经准备好以下信息：&lt;/p&gt;
&lt;ul data-source-line=&quot;11&quot;&gt;
&lt;li&gt;邮箱服务器的地址，例如smtp.example.com。&lt;/li&gt;&lt;li&gt;邮箱服务器的端口号，通常为25、465或587。&lt;/li&gt;&lt;li&gt;使用的协议，通常为SMTP或SMTPS。&lt;/li&gt;&lt;li&gt;登录到邮箱服务器所需的凭据，例如用户名和密码。&lt;/li&gt;&lt;/ul&gt;
&lt;h3 data-source-line=&quot;16&quot; id=&quot;h3--gitlab-&quot;&gt;&lt;a class=&quot;reference-link&quot; name=&quot;修改GitLab配置文件&quot;&gt;&lt;/a&gt;&lt;span class=&quot;header-link octicon octicon-link&quot;&gt;&lt;/span&gt;修改GitLab配置文件&lt;/h3&gt;&lt;ol data-source-line=&quot;18&quot;&gt;
&lt;li&gt;&lt;p&gt;打开GitLab配置文件。在Ubuntu系统上，路径为&lt;code&gt;/etc/gitlab/gitlab.rb&lt;/code&gt;，在Windows上为&lt;code&gt;C:\Program Files\GitLab\etc\gitlab.rb&lt;/code&gt;。&lt;/p&gt;
&lt;/li&gt;&lt;li&gt;&lt;p&gt;使用文本编辑器打开文件，搜索“# GitLab Email settings”以找到以下注释行：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ruby&quot;&gt;# GitLab Email settings
# ======================
# Use smtp instead of the sendmail/postfix.
# Example: `gitlab_rails['smtp_enable'] = true`
# gitlab_rails['smtp_enable'] = false
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;&lt;li&gt;&lt;p&gt;设置&lt;code&gt;gitlab_rails['smtp_enable']&lt;/code&gt;为&lt;code&gt;true&lt;/code&gt;以启用SMTP服务器，或者如果使用Sendmail或Postfix，请将其设置为&lt;code&gt;false&lt;/code&gt;。&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ruby&quot;&gt;gitlab_rails['smtp_enable'] = true
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;&lt;li&gt;&lt;p&gt;指定您的SMTP服务器地址、端口号和协议。例如，如果SMTP服务器地址是smtp.example.com，端口号是465，协议是SMTPS，则在配置文件中添加以下行：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ruby&quot;&gt;gitlab_rails['smtp_address'] = &quot;smtp.example.com&quot;
gitlab_rails['smtp_port'] = 465
gitlab_rails['smtp_enable_starttls_auto'] = false
gitlab_rails['smtp_tls'] = true
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;&lt;li&gt;&lt;p&gt;如果SMTP服务器要求身份验证，请提供您的用户名和密码：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ruby&quot;&gt;gitlab_rails['smtp_user_name'] = &quot;your_username&quot;
gitlab_rails['smtp_password'] = &quot;your_password&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;&lt;li&gt;&lt;p&gt;最后，设置发件人的地址，通常是与GitLab帐户关联的电子邮件地址。例如，如果电子邮件地址是&lt;a href=&quot;mailto:yourname@example.com&quot;&gt;yourname@example.com&lt;/a&gt;，则添加以下行：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ruby&quot;&gt;gitlab_rails['gitlab_email_from'] = &quot;&lt;a href=&quot;mailto:yourname@example.com&quot;&gt;yourname@example.com&lt;/a&gt;&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;&lt;li&gt;&lt;p&gt;保存并关闭文件。&lt;/p&gt;
&lt;/li&gt;&lt;/ol&gt;
&lt;h3 data-source-line=&quot;60&quot; id=&quot;h3--gitlab&quot;&gt;&lt;a class=&quot;reference-link&quot; name=&quot;重新配置GitLab&quot;&gt;&lt;/a&gt;&lt;span class=&quot;header-link octicon octicon-link&quot;&gt;&lt;/span&gt;重新配置GitLab&lt;/h3&gt;&lt;p data-source-line=&quot;62&quot;&gt;在修改GitLab配置文件后，重新配置GitLab以应用新的设置。&lt;/p&gt;
&lt;ul data-source-line=&quot;64&quot;&gt;
&lt;li&gt;&lt;p&gt;在Ubuntu系统上，运行以下命令：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo gitlab-ctl reconfigure
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;&lt;li&gt;&lt;p&gt;在Windows系统上，运行以下命令：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;gitlab-ctl reconfigure
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;&lt;/ul&gt;
&lt;h3 data-source-line=&quot;76&quot; id=&quot;h3-u6D4Bu8BD5u8BBEu7F6E&quot;&gt;&lt;a class=&quot;reference-link&quot; name=&quot;测试设置&quot;&gt;&lt;/a&gt;&lt;span class=&quot;header-link octicon octicon-link&quot;&gt;&lt;/span&gt;测试设置&lt;/h3&gt;&lt;p data-source-line=&quot;78&quot;&gt;为了验证配置是否正确，使用GitLab的测试功能测试您的电子邮件服务器是否正常工作。&lt;/p&gt;
&lt;ol data-source-line=&quot;80&quot;&gt;
&lt;li&gt;打开GitLab的控制台，进入管理区域，然后选择“Settings” -&amp;lt;!--autointro--&amp;gt;&lt;/li&gt;&lt;/ol&gt;
</description><pubDate>Sat, 11 Nov 2023 19:30:08 +0800</pubDate></item><item><title>Ubuntu 使用XRDP 实现远程桌面连接-安装+配置+体验优化</title><link>https://blog.1314.cool/post/71.html</link><description>&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #31333F; font-size: 16px; text-wrap: wrap; background-color: #FFFFFF; font-family: 黑体, SimHei;&quot;&gt;XRDP是一个跨平台的远程桌面连接工具，可以在Windows和Linux上使用。在Ubuntu上使用XRDP可以让你从Windows计算机远程连接到Linux服务器，进行文件传输、远程控制等操作。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #31333F; font-size: 16px; text-wrap: wrap; background-color: #FFFFFF; font-family: 黑体, SimHei;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;!--autointro--&gt;</description><pubDate>Sun, 05 Nov 2023 14:41:50 +0800</pubDate></item><item><title>解决宝塔面板SSL证书安装失败： Invalid version. The only valid version for X509Req is 0.</title><link>https://blog.1314.cool/post/70.html</link><description>&lt;p&gt;&lt;img src=&quot;https://nutswp.com/wp-content/uploads/2023/06/image.png&quot; alt=&quot;宝塔面板SSL证书安装失败：&amp;nbsp;Invalid version. The only valid version for X509Req is 0.&quot;/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;解决以上报错&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: 仓耳渔阳体, sans-serif; font-size: 18px; background-color: #FFFFFF;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;!--autointro--&gt;</description><pubDate>Mon, 05 Jun 2023 06:49:06 +0800</pubDate></item><item><title>Conda 环境下安装Jupyter Lab</title><link>https://blog.1314.cool/post/69.html</link><description>&lt;p data-source-line=&quot;1&quot;&gt;# 初次使用Anaconda时，对命令行进行预载&lt;/p&gt;
&lt;p data-source-line=&quot;3&quot;&gt;&amp;lt;div class=&quot;alert alert-success&quot;&amp;gt;conda init

&lt;/p&gt;
&lt;p data-source-line=&quot;5&quot;&gt;&amp;lt;/div&amp;gt;# 创建一个anaconda的虚拟环境：jupyterLab，方便管理环境

&lt;/p&gt;
&lt;p data-source-line=&quot;7&quot;&gt;&amp;lt;div class=&quot;alert alert-success&quot;&amp;gt;conda create –name jupyterlab python=3.10

&lt;/p&gt;
&lt;p data-source-line=&quot;9&quot;&gt;&amp;lt;/div&amp;gt;&lt;/p&gt;
</description><pubDate>Mon, 05 Jun 2023 06:33:46 +0800</pubDate></item><item><title>Python数学建模算法与应用 - 常用Python命令及程序注解</title><link>https://blog.1314.cool/post/68.html</link><description>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;&lt;meta charset=&quot;utf-8&quot; /&gt;
&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;

&lt;title&gt;第二章 Python使用入门&lt;/title&gt;&lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js&quot;&gt;&lt;/script&gt;&lt;/head&gt;&lt;/html&gt;&lt;!--autointro--&gt;</description><pubDate>Sun, 04 Jun 2023 21:12:36 +0800</pubDate></item><item><title>JupyterLab Jupyter Notebook 无法下载PDF</title><link>https://blog.1314.cool/post/67.html</link><description>&lt;p&gt;运行如下命令：&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;div class=&quot;alert alert-success&quot;&gt;&lt;p&gt;sudo apt-get install pandoc&lt;/p&gt;&lt;p&gt;sudo apt-get install texlive-xetex&lt;/p&gt;&lt;/div&gt;&lt;p&gt;问题即可解决&lt;/p&gt;&lt;!--autointro--&gt;</description><pubDate>Tue, 30 May 2023 17:13:04 +0800</pubDate></item><item><title>解决使用matplotlib.pyplot画图 中文乱码和负号无法显示 问题</title><link>https://blog.1314.cool/post/66.html</link><description>&lt;p&gt;一、临时解决matplotlib画图中文乱码问题（也有可能解决不了，解决不了看方法二）&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;使用matplotlib.pyplot画图，有中文字体会显示乱码问题，这时需要添加如下代码：&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;pre class=&quot;prism-highlight prism-language-python&quot;&gt;import&amp;nbsp;matplotlib.pyplot&amp;nbsp;as&amp;nbsp;plt
...
plt.rcParams[&amp;quot;font.sans-serif&amp;quot;]&amp;nbsp;=&amp;nbsp;[&amp;quot;SimHei&amp;quot;]&lt;/pre&gt;&lt;!--autointro--&gt;</description><pubDate>Tue, 30 May 2023 00:11:31 +0800</pubDate></item></channel></rss>