<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
>
<channel>
<title><![CDATA[熊猫分享]]></title> 
<atom:link href="https://bk.722400.xyz/rss.php" rel="self" type="application/rss+xml" />
<description><![CDATA[分享工作中遇到的一些技术问题]]></description>
<link>https://bk.722400.xyz/</link>
<language>zh-cn</language>
<generator>www.emlog.net</generator>
<item>
    <title>安装opencodex</title>
    <link>https://bk.722400.xyz/?post=28</link>
    <description><![CDATA[<p>自动完成：</p>
<p>✅ 安装基础依赖<br />
✅ 安装 NVM<br />
✅ 安装 Node 24<br />
✅ 安装 opencodex<br />
✅ 恢复 .opencodex<br />
✅ 恢复 .codex<br />
✅ 恢复 systemd 服务<br />
✅ 启动 opencodex<br />
✅ 检查状态</p>
<p>一、创建脚本</p>
<p>新 VPS：</p>
<p>nano /root/restore-opencodex.sh</p>
<p>粘贴：</p>
<h1>!/bin/bash</h1>
<p>set -e</p>
<p>BACKUP_FILE=&quot;$1&quot;</p>
<p>if [ -z &quot;$BACKUP_FILE&quot; ]; then<br />
echo &quot;用法:&quot;<br />
echo &quot;bash restore-opencodex.sh backup.tar.gz&quot;<br />
exit 1<br />
fi</p>
<p>echo &quot;==============================&quot;<br />
echo &quot; OpenCodex Auto Restore&quot;<br />
echo &quot;==============================&quot;</p>
<p>echo &quot;[1/8] 更新系统...&quot;</p>
<p>apt update<br />
apt install -y curl git build-essential</p>
<p>echo &quot;[2/8] 安装 NVM...&quot;</p>
<p>export NVM_DIR=&quot;/root/.nvm&quot;</p>
<p>if [ ! -d &quot;$NVM_DIR&quot; ]; then<br />
curl -o- <a href="https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh">https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh</a> | bash<br />
fi</p>
<p>source /root/.nvm/nvm.sh</p>
<p>echo &quot;[3/8] 安装 Node 24...&quot;</p>
<p>nvm install 24<br />
nvm alias default 24</p>
<p>echo &quot;[4/8] 安装 OpenCodex...&quot;</p>
<p>npm config set ignore-scripts false</p>
<p>npm install -g --allow-scripts=bun @bitkyc08/opencodex</p>
<p>echo &quot;[5/8] 解压备份...&quot;</p>
<p>mkdir -p /root/opencodex-restore</p>
<p>tar -xzvf &quot;$BACKUP_FILE&quot; -C /root/opencodex-restore</p>
<p>BACKUP_DIR=$(find /root/opencodex-restore -maxdepth 1 -type d -name &quot;opencodex-backup-*&quot; | head -1)</p>
<p>if [ -z &quot;$BACKUP_DIR&quot; ]; then<br />
echo &quot;找不到备份目录&quot;<br />
exit 1<br />
fi</p>
<p>echo &quot;[6/8] 恢复配置...&quot;</p>
<p>cp -a &quot;$BACKUP_DIR/.opencodex&quot; /root/ || true</p>
<p>cp -a &quot;$BACKUP_DIR/.codex&quot; /root/ || true</p>
<p>echo &quot;[7/8] 恢复 systemd...&quot;</p>
<p>mkdir -p /root/.config/systemd/user</p>
<p>if [ -d &quot;$BACKUP_DIR/systemd/user&quot; ]; then<br />
cp -a &quot;$BACKUP_DIR/systemd/user/&quot;* /root/.config/systemd/user/<br />
fi</p>
<p>loginctl enable-linger root || true</p>
<p>systemctl --user daemon-reload || true</p>
<p>echo &quot;[8/8] 启动服务...&quot;</p>
<p>ocx service install || true</p>
<p>ocx restart || ocx start</p>
<p>echo<br />
echo &quot;==============================&quot;<br />
echo &quot; 完成&quot;<br />
echo &quot;==============================&quot;</p>
<p>ocx status</p>
<p>保存：</p>
<p>Ctrl + O<br />
Enter<br />
Ctrl + X<br />
二、授权<br />
chmod +x /root/restore-opencodex.sh<br />
三、上传你的备份包</p>
<p>Windows：</p>
<p>假设：</p>
<p>opencodex-backup-20260724-092535.tar.gz</p>
<p>上传：</p>
<p>scp opencodex-backup-20260724-092535.tar.gz root@新VPS_IP:/root/</p>
<p>同时上传脚本：</p>
<p>scp restore-opencodex.sh root@新VPS_IP:/root/<br />
四、新 VPS 执行</p>
<p>SSH：</p>
<p>ssh root@新VPS_IP</p>
<p>运行：</p>
<p>bash restore-opencodex.sh opencodex-backup-20260724-092535.tar.gz</p>
<p>等待完成。</p>
<p>最后应该看到：</p>
<p>✅ Proxy: running</p>
<p>Health:<br />
ok</p>
<p>Service:<br />
installed enabled running<br />
注意一个地方</p>
<p>你的备份里面有：</p>
<p>.codex/auth.json</p>
<p>所以恢复后可能直接继承 Codex 登录。</p>
<p>如果不想迁移账号，把这一行删除：</p>
<p>cp -a &quot;$BACKUP_DIR/.codex&quot; /root/</p>]]></description>
    <pubDate>Fri, 24 Jul 2026 17:33:35 +0800</pubDate>
    <dc:creator>熊猫老师</dc:creator>
    <guid>https://bk.722400.xyz/?post=28</guid>
</item>
<item>
    <title>知识库key</title>
    <link>https://bk.722400.xyz/?post=27</link>
    <description><![CDATA[<p>JSVKRMZZDB973GF77SJ71WE8FSEQECR14WYP5PE41WQ3KWRY0FB060R30D9G68WKG</p>
<p>vironment:<br />
MYSQL_DATABASE: lessonforge<br />
MYSQL_USER: lessonforge<br />
MYSQL_PASSWORD: lessonforge_qsx831220<br />
MYSQL_ROOT_PASSWORD: Qsx@831220</p>
<pre><code>  豆包调用
  curl https://ark.cn-beijing.volces.com/api/v3/responses \</code></pre>
<p>-H &quot;Authorization: Bearer $ARK_API_KEY&quot; \<br />
-H 'Content-Type: application/json' \<br />
-d '{<br />
&quot;model&quot;: &quot;doubao-seed-2-1-pro-260628&quot;,<br />
&quot;input&quot;: [<br />
{<br />
&quot;role&quot;: &quot;user&quot;,<br />
&quot;content&quot;: [<br />
{<br />
&quot;type&quot;: &quot;input_image&quot;,<br />
&quot;image_url&quot;: &quot;<a href="https://ark-project.tos-cn-beijing.volces.com/doc_image/ark_demo_img_1.png">https://ark-project.tos-cn-beijing.volces.com/doc_image/ark_demo_img_1.png</a>&quot;<br />
},<br />
{<br />
&quot;type&quot;: &quot;input_text&quot;,<br />
&quot;text&quot;: &quot;你看见了什么？&quot;<br />
}<br />
]<br />
}<br />
]<br />
}'</p>]]></description>
    <pubDate>Mon, 06 Jul 2026 15:55:35 +0800</pubDate>
    <dc:creator>熊猫老师</dc:creator>
    <guid>https://bk.722400.xyz/?post=27</guid>
</item>
<item>
    <title>AI智能识物</title>
    <link>https://bk.722400.xyz/?post=25</link>
    <description><![CDATA[<p>AI智能识物<br />
应用描述<br />
本应用面向小学科学教学场景，基于图像识别技术，实现对常见物品、动植物等的智能识别与分类。学生可通过拍照或上传图片，快速获取物体名称、基本特征及相关科普知识，帮助提升观察能力与探究兴趣。应用支持动物、植物、日常物品等多类型识别，适用于课堂教学、课外实践及科学探究活动，助力构建直观、生动的学习体验，提高科学素养与实践能力。<br />
AppID<br />
7654631<br />
API Key<br />
21EzNrMqufkvyDm1OOdZRo59<br />
复制<br />
Secret Key<br />
Z45DGYYBQOVoxQfE8pdiMzNr5viUxBvP<br />
复制</p>]]></description>
    <pubDate>Tue, 21 Apr 2026 11:04:19 +0800</pubDate>
    <dc:creator>熊猫老师</dc:creator>
    <guid>https://bk.722400.xyz/?post=25</guid>
</item>
<item>
    <title>校本研修+智慧平台：构建教师数字素养提升双路径</title>
    <link>https://bk.722400.xyz/?post=24</link>
    <description><![CDATA[<p><a href="https://bk.722400.xyz/content/uploadfile/202603/a7a61774509080.png"><img src="https://bk.722400.xyz/content/uploadfile/202603/a7a61774509080.png" alt="" /></a><br />
<a href="https://bk.722400.xyz/content/uploadfile/202603/c4431774509136.png"><img src="https://bk.722400.xyz/content/uploadfile/202603/c4431774509136.png" alt="" /></a><br />
<a href="https://bk.722400.xyz/content/uploadfile/202603/2d911774509190.png"><img src="https://bk.722400.xyz/content/uploadfile/202603/2d911774509190.png" alt="" /></a><br />
<a href="https://bk.722400.xyz/content/uploadfile/202603/43671774509217.png"><img src="https://bk.722400.xyz/content/uploadfile/202603/43671774509217.png" alt="" /></a><br />
<a href="https://bk.722400.xyz/content/uploadfile/202603/03111774509236.png"><img src="https://bk.722400.xyz/content/uploadfile/202603/03111774509236.png" alt="" /></a><br />
<a href="https://bk.722400.xyz/content/uploadfile/202603/1feb1774509279.png"><img src="https://bk.722400.xyz/content/uploadfile/202603/1feb1774509279.png" alt="" /></a><br />
<a href="https://bk.722400.xyz/content/uploadfile/202603/3ffe1774509315.png"><img src="https://bk.722400.xyz/content/uploadfile/202603/3ffe1774509315.png" alt="" /></a><br />
<a href="https://bk.722400.xyz/content/uploadfile/202603/df541774509540.png"><img src="https://bk.722400.xyz/content/uploadfile/202603/df541774509540.png" alt="" /></a><br />
<a href="https://bk.722400.xyz/content/uploadfile/202603/82d51774509717.png"><img src="https://bk.722400.xyz/content/uploadfile/202603/82d51774509717.png" alt="" /></a></p>]]></description>
    <pubDate>Thu, 26 Mar 2026 15:11:18 +0800</pubDate>
    <dc:creator>熊猫老师</dc:creator>
    <guid>https://bk.722400.xyz/?post=24</guid>
</item>
<item>
    <title>🧠 Python 学习笔记：列表统计函数练习整理（入门必练）</title>
    <link>https://bk.722400.xyz/?post=23</link>
    <description><![CDATA[<p>在学习 Python 的过程中，列表（list）是最常用的数据结构之一。本篇记录一些基础但非常重要的练习，包括：</p>
<ul>
<li>求和</li>
<li>最大值 / 最小值</li>
<li>平均值</li>
<li>综合统计（max / min / avg）</li>
<li>条件计数</li>
<li>区间筛选</li>
<li>查找元素下标</li>
</ul>
<p>这些练习的核心思想只有一个：👉 <strong>遍历列表（for 循环）</strong></p>
<hr />
<h2>📌 一、求和（sum）</h2>
<pre><code class="language-python">def sum_nums(nums):
    """
    计算列表中所有元素的总和
    """
    total = 0
    for i in nums:
        total = total + i
    return total

print(sum_nums([23, 23, 23, 45, 23]))</code></pre>
<h3>💡 思路</h3>
<ul>
<li>用一个变量 <code>total</code> 存总和</li>
<li>遍历列表，不断累加</li>
</ul>
<hr />
<h2>📌 二、求最大值（max）</h2>
<pre><code class="language-python">def max_nums(nums):
    """
    返回列表中的最大值
    """
    max_num = nums[0]  # 假设第一个元素最大

    for i in nums:
        if i &gt; max_num:
            max_num = i

    return max_num

print(max_nums([23, 23, 423, 32]))</code></pre>
<h3>💡 思路</h3>
<ul>
<li>先设第一个元素为最大值</li>
<li>遍历并不断更新</li>
</ul>
<hr />
<h2>📌 三、求最小值（min）</h2>
<pre><code class="language-python">def min_nums(nums):
    """
    返回列表中的最小值
    """
    min_num = nums[0]

    for i in nums:
        if i &lt; min_num:
            min_num = i

    return min_num

print(min_nums([27, 29, 23, 43]))</code></pre>
<hr />
<h2>📌 四、求平均值（avg）</h2>
<pre><code class="language-python">def avg(nums):
    """
    计算列表平均值
    """
    total = 0

    for i in nums:
        total = total + i

    average = total / len(nums)
    return average

print(avg([27, 29, 23, 43]))</code></pre>
<h3>💡 公式</h3>
<blockquote>
<p>平均值 = 总和 / 个数</p>
</blockquote>
<hr />
<h2>📌 五、统计 max / min / avg（基础写法）</h2>
<pre><code class="language-python">def sats(nums):
    """
    同时返回最大值、最小值、平均值（多次遍历）
    """
    # 最大值
    max_num = nums[0]
    for i in nums:
        if i &gt; max_num:
            max_num = i

    # 最小值
    min_num = nums[0]
    for i in nums:
        if i &lt; min_num:
            min_num = i

    # 平均值
    total = 0
    for i in nums:
        total = total + i

    avg = total / len(nums)

    return max_num, min_num, avg

print(sats([23, 54, 28, 23]))</code></pre>
<hr />
<h2>📌 六、统计 max / min / avg（优化写法 ⭐）</h2>
<pre><code class="language-python">def stats(nums):
    """
    同时返回最大值、最小值、平均值（一次遍历完成）
    """
    max_num = nums[0]
    min_num = nums[0]
    total = 0

    for i in nums:
        if i &gt; max_num:
            max_num = i
        if i &lt; min_num:
            min_num = i
        total = total + i

    avg = total / len(nums)

    return max_num, min_num, avg

print(stats([27, 29, 23, 43]))</code></pre>
<h3>🚀 优点</h3>
<ul>
<li>只遍历一次列表</li>
<li>更高效（面试常考点）</li>
</ul>
<hr />
<h2>📌 七、统计大于某个值的个数</h2>
<pre><code class="language-python">def count_greater(nums, x):
    """
    统计大于 x 的元素个数
    """
    count = 0

    for i in nums:
        if i &gt; x:
            count = count + 1

    return count

print(count_greater([23, 54, 23], 10))</code></pre>
<hr />
<h2>📌 八、统计区间内元素个数</h2>
<pre><code class="language-python">def count_between(nums, a, b):
    """
    统计区间 [a, b] 内的元素个数（包含边界）
    """
    count = 0

    for i in nums:
        if a &lt;= i &lt;= b:
            count = count + 1

    return count

print(count_between([23, 25, 43, 64], 23, 40))</code></pre>
<hr />
<h2>📌 九、找出区间内的元素</h2>
<pre><code class="language-python">def find_between(nums, a, b):
    """
    找出区间 (a, b) 内的所有元素（不包含边界）
    """
    result = []

    for i in nums:
        if a &lt; i &lt; b:
            result.append(i)

    return result

print(find_between([23, 24, 32, 35], 22, 30))</code></pre>
<h3>💡 区别</h3>
<table>
<thead>
<tr>
<th>函数</th>
<th>返回</th>
</tr>
</thead>
<tbody>
<tr>
<td>count_between</td>
<td>个数</td>
</tr>
<tr>
<td>find_between</td>
<td>元素列表</td>
</tr>
</tbody>
</table>
<hr />
<h2>📌 十、查找最大值下标</h2>
<pre><code class="language-python">def find_max_idx(nums):
    """
    返回最大值所在的索引（下标）
    """
    max_val = nums[0]
    max_idx = 0

    for i in range(len(nums)):
        if nums[i] &gt; max_val:
            max_val = nums[i]
            max_idx = i

    return max_idx

print(find_max_idx([23, 25, 534]))</code></pre>
<hr />
<h2>📌 十一、查找最小值下标</h2>
<pre><code class="language-python">def find_min_idx(nums):
    """
    返回最小值所在的索引（下标）
    """
    min_val = nums[0]
    min_idx = 0

    for i in range(1, len(nums)):
        if nums[i] &lt; min_val:
            min_val = nums[i]
            min_idx = i

    return min_idx

print(find_min_idx([23, 25, 534]))</code></pre>
<hr />
<h1>📦 完整代码（可直接运行）</h1>
<pre><code class="language-python">def sum_nums(nums):
    total = 0
    for i in nums:
        total += i
    return total

def max_nums(nums):
    max_num = nums[0]
    for i in nums:
        if i &gt; max_num:
            max_num = i
    return max_num

def min_nums(nums):
    min_num = nums[0]
    for i in nums:
        if i &lt; min_num:
            min_num = i
    return min_num

def avg(nums):
    total = 0
    for i in nums:
        total += i
    return total / len(nums)

def stats(nums):
    max_num = nums[0]
    min_num = nums[0]
    total = 0

    for i in nums:
        if i &gt; max_num:
            max_num = i
        if i &lt; min_num:
            min_num = i
        total += i

    return max_num, min_num, total / len(nums)

def count_greater(nums, x):
    count = 0
    for i in nums:
        if i &gt; x:
            count += 1
    return count

def count_between(nums, a, b):
    count = 0
    for i in nums:
        if a &lt;= i &lt;= b:
            count += 1
    return count

def find_between(nums, a, b):
    result = []
    for i in nums:
        if a &lt; i &lt; b:
            result.append(i)
    return result

def find_max_idx(nums):
    max_val = nums[0]
    max_idx = 0

    for i in range(len(nums)):
        if nums[i] &gt; max_val:
            max_val = nums[i]
            max_idx = i

    return max_idx

def find_min_idx(nums):
    min_val = nums[0]
    min_idx = 0

    for i in range(1, len(nums)):
        if nums[i] &lt; min_val:
            min_val = nums[i]
            min_idx = i

    return min_idx</code></pre>
<hr />
<h1>🧾 学习总结</h1>
<p>通过这些练习，我掌握了：</p>
<ul>
<li>for 循环遍历列表</li>
<li>累加器思想（total / count）</li>
<li>最大最小值更新逻辑</li>
<li>函数封装</li>
<li>返回多个值（tuple）</li>
<li>append() 使用</li>
<li>下标遍历</li>
</ul>
<p>👉 这些都是后续学习算法和数据结构的基础。</p>
<hr />]]></description>
    <pubDate>Wed, 25 Mar 2026 10:42:26 +0800</pubDate>
    <dc:creator>熊猫老师</dc:creator>
    <guid>https://bk.722400.xyz/?post=23</guid>
</item>
<item>
    <title>python 打包exe PowerShell命令</title>
    <link>https://bk.722400.xyz/?post=22</link>
    <description><![CDATA[<p>pyinstaller -F -w --clean --noconfirm --hidden-import=win32com.client --hidden-import=pythoncom &quot;课后服务表_按年级合并_gui.py&quot;</p>]]></description>
    <pubDate>Fri, 30 Jan 2026 10:43:17 +0800</pubDate>
    <dc:creator>熊猫老师</dc:creator>
    <guid>https://bk.722400.xyz/?post=22</guid>
</item>
<item>
    <title>课后服务退费操作</title>
    <link>https://bk.722400.xyz/?post=21</link>
    <description><![CDATA[<p>退费表格下载及上传网址：<a href="https://wj.722400.xyz/">https://wj.722400.xyz/</a><br />
<a href="https://bk.722400.xyz/content/uploadfile/202601/58c61769573105.png"><img src="https://bk.722400.xyz/content/uploadfile/202601/58c61769573105.png" alt="" /></a><br />
注意事项：<br />
1.各班主任下载本班退费表格模板，只填写退款金额一列，格式为数字，别的地方不要改动。<br />
2.统计学生实际上课的天数。上够80天不退费，不够80天的。400 -实际上课天数*5 =退款金额<br />
3.不退费的填0，个别全部退费的填400。<br />
4.部分家庭贫困学生学期初交了费，需全部退回。<br />
强调：<br />
1.有些学生缴费到别的班级的或者表格里面出现非自己班的学生。班主任之间相互联系，核查清楚退费金额，把表格填写完整，不要留空。<br />
2.有问题务必及时联系我，如果进入退费环节，就无法修改和增加了。</p>]]></description>
    <pubDate>Wed, 28 Jan 2026 12:03:08 +0800</pubDate>
    <dc:creator>熊猫老师</dc:creator>
    <guid>https://bk.722400.xyz/?post=21</guid>
</item>
<item>
    <title>小智音乐固件</title>
    <link>https://bk.722400.xyz/?post=20</link>
    <description><![CDATA[<p>这是一个由虾哥开源的ESP32项目，以 MIT 许可证发布，允许任何人免费使用，或用于商业用途。</p>
<p>我们希望通过这个项目，让大家的小智都能播放歌曲。</p>
<p>如果你有任何想法或建议，请随时提出 Issues 或加入 QQ 群：826072986</p>
<p>项目主要贡献者：空白泡泡糖果 (B站UP)，硅灵造物科技 (B站UP)，小霜霜Meow (B站UP)</p>
<p>音乐服务器提供者（为爱发电）：cz</p>
<p>💡注意事项</p>
<ol>
<li>如果小智说找不到歌曲怎么办？<br />
进入小智后台，找到对应设备，修改角色配置</li>
</ol>
<p>选择 DeepSeekV3 大语言模型<br />
在人物介绍中填入<br />
收到音乐相关的需求时，只使用 MPC tool self.music.play_song 工具，同时禁止使用 search_music 功能。</p>
<ol start="3">
<li>暂不支持的开发板<br />
ESP32C3芯片的开发板<br />
项目改动范围<br />
新增<br />
main\boards\common\music.h<br />
main\boards\common\esp32_music.cc<br />
main\boards\common\esp32_music.h<br />
修改<br />
main\mcp_server.cc<br />
main\boards\common\board.cc<br />
main\boards\common\board.h<br />
main\application.cc<br />
main\application.h<br />
main\display\display.cc<br />
main\display\display.h<br />
main\audio\audio_service.cc<br />
main\audio\audio_service.h<br />
main\idf_component.yml</li>
</ol>]]></description>
    <pubDate>Sat, 10 Jan 2026 10:00:21 +0800</pubDate>
    <dc:creator>熊猫老师</dc:creator>
    <guid>https://bk.722400.xyz/?post=20</guid>
</item>
<item>
    <title>系统还原 希沃一体机</title>
    <link>https://bk.722400.xyz/?post=19</link>
    <description><![CDATA[<p>1.开机按F2 进入bios设置<br />
2.打开back备份还原开关。按f10保存。<br />
<a href="https://bk.722400.xyz/content/uploadfile/202512/02001766621968.png"><img src="https://bk.722400.xyz/content/uploadfile/202512/02001766621968.png" alt="" /></a><br />
3.重启电脑，再按f2进入bios，alt+f4 恢复出厂系统  选择yes 回车 ，重启恢复。<br />
<a href="https://bk.722400.xyz/content/uploadfile/202512/8e231766622115.png"><img src="https://bk.722400.xyz/content/uploadfile/202512/8e231766622115.png" alt="" /></a></p>]]></description>
    <pubDate>Thu, 25 Dec 2025 08:18:03 +0800</pubDate>
    <dc:creator>熊猫老师</dc:creator>
    <guid>https://bk.722400.xyz/?post=19</guid>
</item>
<item>
    <title>mcp不掉线做法</title>
    <link>https://bk.722400.xyz/?post=16</link>
    <description><![CDATA[<p>最终正确解法（强烈推荐，照做即可）<br />
🔐 第 1 步：用 .env 文件保存 MCP_ENDPOINT<br />
sudo tee /root/mcp-tool/.env &gt; /dev/null &lt;&lt; 'EOF'<br />
MCP_ENDPOINT=ws://122.51.216.154:8004/mcp_endpoint/mcp/?token=请换成你的新token<br />
EOF</p>
<p>然后锁权限（很重要）：</p>
<p>sudo chmod 600 /root/mcp-tool/.env</p>
<p>🧾 第 2 步：修改 service 文件（只保留干净配置）<br />
sudo nano /etc/systemd/system/mcp-calculator.service</p>
<p>把 [Service] 改成下面这样（重点）：</p>
<p>[Service]<br />
Type=simple<br />
User=root<br />
WorkingDirectory=/root/mcp-tool<br />
EnvironmentFile=/root/mcp-tool/.env<br />
ExecStart=/usr/bin/python3 /root/mcp-tool/mcp_pipe.py /root/mcp-tool/calculator.py<br />
Restart=always<br />
RestartSec=3<br />
StandardOutput=journal<br />
StandardError=journal</p>
<p>👉 注意：</p>
<p>❌ 不要再有 Environment=</p>
<p>✅ 只保留 EnvironmentFile=</p>
<p>🔄 第 3 步：完整重载并重启<br />
sudo systemctl daemon-reload<br />
sudo systemctl stop mcp-calculator<br />
sudo systemctl start mcp-calculator<br />
sudo systemctl status mcp-calculator</p>
<p>✅ 正确结果应该是<br />
Active: active (running)</p>
<p>并且日志中 永远不再出现：</p>
<p>Please set the <code>MCP_ENDPOINT</code> environment variable</p>]]></description>
    <pubDate>Tue, 16 Dec 2025 09:25:56 +0800</pubDate>
    <dc:creator>熊猫老师</dc:creator>
    <guid>https://bk.722400.xyz/?post=16</guid>
</item></channel>
</rss>