擅长:python、mysql、java
<p>这可以通过手动将PyCharm中的<code>PATH</code>变量添加到控制台中来解决。</p>
<ol>
<li>打开你的水蟒命令</li>
<li><a href="https://stackoverflow.com/questions/20081338/how-to-activate-an-anaconda-environment">Activate your Conda environment</a></li>
<li>通过键入<code>echo %PATH%</code>获取完整路径值
<ul>
<li>如果您在Windows 7上/无法复制输出,请将命令cd到桌面并键入<code>echo %PATH% > path_val.txt</code></li>
<li>这将创建一个txt文件,以便您可以更轻松地复制/粘贴值。</li>
</ul></li>
<li>在PyCharm中,转到<strong>设置->;生成、执行、部署->;控制台->;Python控制台->;单击环境变量右侧的文件夹。</strong></li>
<li>单击加号按钮添加新的环境变量
<ul>
<li>名称应该是<code>PATH</code></li>
<li>该值是上面<code>echo %PATH%</code>命令的整个输出。</li>
</ul></li>
<li>单击“确定”,然后单击“应用”。</li>
</ol>