PyProj 使用 OSMnx 包时出现问题

发布于 2025-01-13 05:43:31 字数 555 浏览 1 评论 0原文

我最近根据 此处提供的安装说明使用 Anaconda 环境(python 3.10.2)安装了 OSMnx 软件包< /a>.当我尝试将 OSMnx 包导入 Python 环境时,它会显示以下通知:

C:\Users\Reza\anaconda3\envs\ox\lib\site-packages\pyproj\__init__.py:91: 
UserWarning: Valid PROJ data directory not found. Either set the path using the 
environmental variable PROJ_LIB or with `pyproj.datadir.set_data_dir`. 
warnings.warn(str(err))

我尝试了互联网上建议的几种解决方案,但没有一个对我有用!您有解决这个问题的想法吗?

I have recently installed the OSMnx package using Anaconda environment (python 3.10.2) based on the installation instruction provided here. Once I try to import the OSMnx package into Python environment, it shows the following notification:

C:\Users\Reza\anaconda3\envs\ox\lib\site-packages\pyproj\__init__.py:91: 
UserWarning: Valid PROJ data directory not found. Either set the path using the 
environmental variable PROJ_LIB or with `pyproj.datadir.set_data_dir`. 
warnings.warn(str(err))

I have tried several solutions suggested on the Internet, but none of them worked for me! Do you have any ideas for resolving this problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蓝眸 2025-01-20 05:43:31

由于这可能是一个很难重现的问题,并且您已经尝试了许多解决方案,但没有一个对您有效,因此我建议使用 Docker 运行 OSMnx,遵循以下简单步骤:

  1. 安装 Docker
  2. 拉取 OSMnx 的 Docker 镜像:docker pull gboeing/osmnx
  3. 将位置更改为您的工作目录:cd path/to/workdir
  4. 转到此页面的“用法”部分,然后根据您的操作系统和按照您想要运行 OSMnx 的方式,选择一个命令并运行它。

Since this could be a difficult problem to reproduce, and since you have tried many solutions but none have worked for you, I recommend running OSMnx using Docker, following these simple steps:

  1. Install Docker.
  2. Pull the Docker image of OSMnx: docker pull gboeing/osmnx.
  3. Change the location to your work directory: cd path/to/workdir.
  4. Go to the "Usage" section of this page, and depending on your operating system and the way you want to run OSMnx, choose a command and run it.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文