• 安装
pip install scipy -i https://mirrors.aliyun.com/pypi/simple/

这里遇到了一个问题,如果电脑已经安装了anaconda,那么pip下载的库会安装到conda的文件路径下去,之前vscode识别的interpreter是没办法成功导入库的,因此如果继续使用vscode写代码需要注意一下interpreter是否正确,否则会出现import失败的情况

  • 导入
import numpy as np
import matplotlib.pyplot as plt
import scipy as sp

参考:https://www.youtube.com/watch?v=jmX4FOUEfgU


0 条评论

发表回复

Avatar placeholder

您的邮箱地址不会被公开。 必填项已用 * 标注