[英]Anaconda-Error: cannot import name Transformer from pyproj
I try to install Transformer from pyproj and get the message "cannot import name".我尝试从 pyproj 安装 Transformer 并收到消息“无法导入名称”。 I installed pyproy using Anaconda Navigator.我使用 Anaconda Navigator 安装了 pyproy。 There it tells me I have version 1.9.6.它告诉我我有版本 1.9.6。 (newest update). (最新更新)。 I found a thread about same issue but it didn't help me ( cannot import name Transformer from pyproj ).我发现了一个关于相同问题的线程,但它对我没有帮助( 无法从 pyproj 导入名称 Transformer )。 I checked pyproj-Documentation and installed via terminal conda install -c conda-forge proj-datumgrid-europe proj-datumgrid-north-america proj-datumgrid-oceania proj-datumgrid-world
.我检查了 pyproj-Documentation 并通过终端conda install -c conda-forge proj-datumgrid-europe proj-datumgrid-north-america proj-datumgrid-oceania proj-datumgrid-world
。
Not sure if that's the right thing to do.不确定这是否是正确的做法。 I'm a noob.-.我是菜鸟.- help is appreciated.帮助表示赞赏。
ImportError Traceback (most recent call last)
/var/folders/jy/1f2tlvb965g30zhw9q3cvdw07r5rb_/T/ipykernel_49825/1776791710.py in <module>
4 from shapely.geometry import Point, LineString
5 import pyproj as pi
----> 6 from pyproj import Transformer
ImportError: cannot import name 'Transformer' from 'pyproj' (/Users/vob/opt/anaconda3/envs/geopandas/lib/python3.8/site-packages/pyproj/__init__.py)
The latest version of pyproj is 3.3 at the moment.目前 pyproj 的最新版本是 3.3。 To update, recommend looking at pyproj installation instructions: https://pyproj4.github.io/pyproj/stable/installation.html要更新,建议查看 pyproj 安装说明: https://pyproj4.github.io/pyproj/stable/installation.html
Here is a snippet:这是一个片段:
conda config --prepend channels conda-forge
conda config --set channel_priority strict
conda create -n pyproj_env pyproj
conda activate pyproj_env
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.