在IDE(Spyder)中使用pygmt与conda
我正在使用Spyder来制作我的代码。 我尝试使用pygmt lib,但是,在我的spyder-env中,我有一个错误:
GMTCLibNotFoundError: Error loading GMT shared library at 'libgmt.so'.
libgmt.so: cannot open shared object file: No such file or directory
根据pygmt文档,我必须创建一个新的env来使用此lib,所以我做到了:
conda create --name pygmt --channel conda-forge pygmt
conda activate pygmt
但是我有2个问题:
spyder:
spyder用3个版本而不是5版启动自己(如我的spyder-env/典型)。。
错误停留:
gmtclibnotfounderror:错误加载GMT共享库,请访问'/home/vialb/miniconda3/envs/pygmt/lib/lib/libgmt.so'。 /USR/lib/x86_64-linux-gnu/libstdc++so.6:找不到版本`glibcxx_3.4.30'找不到(/home/vialb/miniconda3/envs/envs/pygmt/pygmt/./libgmt/./libgdal/./libgdal./libgdal./libgdal,31) 错误在'libgmt.so'上加载GMT共享库。 libgmt.so:无法打开共享对象文件:没有这样的文件或目录
我不熟悉环境的此类文件或目录,所以我不知道TOT对此有什么影响...
有什么想法吗?
I'm using spyder to make my codes.
I try to use pygmt lib but, in my spyder-env I have an error :
GMTCLibNotFoundError: Error loading GMT shared library at 'libgmt.so'.
libgmt.so: cannot open shared object file: No such file or directory
According to the pygmt documentation, I have to create a new env to use this lib, so I did :
conda create --name pygmt --channel conda-forge pygmt
conda activate pygmt
But I have 2 problems :
spyder launch itself with the 3 version instead of 5 (as in my spyder-env/ typically).
Error stays :
GMTCLibNotFoundError: Error loading GMT shared library at '/home/vialb/miniconda3/envs/pygmt/lib/libgmt.so'.
/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /home/vialb/miniconda3/envs/pygmt/lib/./libgdal.so.31)
Error loading GMT shared library at 'libgmt.so'.
libgmt.so: cannot open shared object file: No such file or directory
I'm not familiar with environment so, I don't know what tot do with this...
Any idea ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
哼,不确定我是否做了不同的事情,但是现在使用此过程,这是在工作:
在(基本)环境上,使用:
创建pygmt env
conda create -name pygmt -Channel conda-forge pygmt
激活新的env:
conda激活pygmt
安装spyder
conda安装spyder
和...仅此而已。 Spyder在版本5中打开,导入Pygmt也有效。
Hum, not sure if I done something different, but that's working now, with this procedure :
on the (base) environnement, create pygmt env with :
conda create --name pygmt --channel conda-forge pygmt
activate the new env :
conda activate pygmt
install spyder
conda install spyder
And ... That's all. Spyder open in version 5 and import pygmt works too.