如何解决在 VS Code 终端中执行程序时,Matplotlib 不显示绘图
我这里有这个简单的程序
class CreateProductVariationsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('product_variations',function (Blueprint $table) {
$table->increments('id');
$table->integer('product_id')->unsigned()->index();
$table->string('name');
$table->integer('price')->nullable();
$table->integer('order')->nullable();
$table->timestamps();
$table->foreign('product_id')->references('id')->on('products');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('product_variations');
}
}
当上述程序在 vscode 终端中运行时。无法看到绘图(通常会出现一个显示绘图的弹出窗口)。
但是当程序在 Ubuntu 终端中运行时,情节可以看作是一个弹出窗口。
知道如何使用 vscode 解决这个问题。
操作系统:Ubuntu 20.04
Visual Studio 代码 1.54.3
Python:3.8.5
解决方法
仔细检查此选项是否在“设置”中打开:terminal.integrated.inheritEnv
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。