CANPOPY LINUX的可以安装ProJ 8.0.0
我正在尝试在Ubuntu上安装CATTOPY,并需要安装Proj V8.0.0
用于造型的二进制文件。但是,当我尝试apt-get install proj-bin
时,我只能获得proj v6.3.1
。如何安装最新的(或至少v8.0.0
)proj?
I am trying to install Cartopy on Ubuntu and need to install proj v8.0.0
binaries for Cartopy. However when I try to apt-get install proj-bin
I can only get proj v6.3.1
. How do I install the latest (or at least v8.0.0
) proj for cartopy?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我在这里回答自己的问题,部分是为了帮助他人解决这个问题,部分是作为我自己的档案,所以如果我再次遇到这个问题,我知道如何解决此问题。我花了一段时间试图弄清楚它,并编写了详细的说明,因此请参阅下面:
安装CATTOPY是一个巨大的痛苦,我发现使用Conda是一个非常糟糕的主意(它已经砖砌了(它已经做到了,python)对我来说多次)
此安装适用于Linux。
步骤0。更新APT:
步骤1。SthernGeos:
运行以下命令以安装Geos:
如果不这样做,请使用以下所有文件:
步骤2。Sthernproj依赖项:
步骤3。安装ProJ
尝试
apt-get
以防万一它有效:不幸的是,Cartopy需要ProJ V8.0.0作为最小值.3.1
仅供参考,以防万一更改,这是从apt安装proj的命令:
我很确定这就是您所需要的,但是如果不是,此命令将安装剩余的proj文件:
要删除上面的proj文件安装,运行:
或:
从源构建proj,
因此,如果以上命令不起作用(截至2022/4/8),请按照以下说明从 source :
proj-xxxtar.gz
):测试命令在一个测试中失败了(
19 -NKG
),但否则很好。中找到所需的文件
。
./ bin
使用PIP安装CATTOPY:
执行此操作后,我的摄影作品仍然无法正常工作。我下周回家去工作,回来了,突然之间它正在工作,所以也许尝试重新启动
I'm answering my own question here partly to help others with this problem, and partly as an archive for myself so I know how to fix this issue if I come across it again. I spent quite a while trying to figure it out, and wrote detailed instructions, so see below:
Installing cartopy is a huge pain, and I've found using conda to be a very bad idea (it has bricked itself and python along with it multiple times for me)
THIS INSTALLATION IS FOR LINUX.
Step 0. Update apt:
Step 1. Install GEOS:
Run the following command to install GEOS:
In case that doesn't do it, install all files with this:
Step 2. Install proj dependencies:
Step 3. Install Proj
Trying
apt-get
just in case it works:Unfortunately, cartopy requires proj v8.0.0 as a minimum, but if you install proj using apt you can only install proj v6.3.1
Just for reference in case anything changes, this is the command to install proj from apt:
I'm fairly sure this is all you need, but in case it's not, this command will install the remaining proj files:
To remove the above installation, run:
or:
Building Proj from source
So if the above commands don't work (it's not working as of 2022/4/8), then follow the below instructions to install proj from source:
proj-x.x.x.tar.gz
):The test command failed on one test for me (
19 - nkg
), but otherwise was fine.You should find the required files in the
./bin
directoryFinally:
Now after all this, you can finally install cartopy with pip:
After doing this, my cartopy still wasn't working. I went home to work on this next week, came back, and all of a sudden it was working so maybe try restarting
图书馆应手动复制
sudo cp ./lib/*/lib
这对我有用
The libraries should be copied manually
sudo cp ./lib/* /lib
This works for me
以下是
多阶段
Dockerfile
我组合在一起,用于使用大气数据和机器学习。Below is a
Multistage
Dockerfile
I put together for working with atmospheric data and machine learning.对于使用Red Hat Enterprise Linux 8的任何人,这就是我的工作方式:
安装依赖项:
然后下载源:
然后配置和构建:
然后在Python虚拟环境中安装摄影作品正常工作。
希望对某人有帮助。
And for anyone using Red Hat Enterprise Linux 8 here is how I did it:
Install the dependencies:
Then download the source:
Then configure and build:
Then installing Cartopy in a Python Virtual Environment worked fine.
Hope that helps someone.