You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Mac系统Conda环境安装Cloupy失败:pip安装报错求助

在MacBook Conda环境中安装Cloupy遇到的问题

背景

我想在MacBook的Conda环境(用于运行Spyder的spyder-geo环境)中安装Cloupy,但该工具仅提供Linux系统的pip3安装说明。

尝试的操作

  • 激活Conda环境:
conda activate spyder-geo
  • 执行安装命令:
pip install cloupy

或

pip3 install cloupy

遇到的错误

执行安装后出现以下错误(核心问题为pyproj编译失败):

(spyder-geo) andreacecilia@MacBook-Pro-di-Andrea ~ % pip install cloupy       
Collecting cloupy
  Using cached cloupy-1.1.0-py3-none-any.whl (1.0 MB)
Collecting matplotlib<=3.5.1,>=3.4.3
  Downloading matplotlib-3.5.1-cp39-cp39-macosx_11_0_arm64.whl (7.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.2/7.2 MB 8.8 MB/s eta 0:00:00
Collecting pandas<=1.3.5,>=1.3.3
  Using cached pandas-1.3.5.tar.gz (4.7 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting beautifulsoup4<=4.10.0,>=4.9.3
  Using cached beautifulsoup4-4.10.0-py3-none-any.whl (97 kB)
Collecting scipy<=1.7.3,>=1.7.2
  Using cached scipy-1.7.3-1-cp39-cp39-macosx_12_0_arm64.whl (27.0 MB)
Collecting Pillow<=9.0.0,>=8.4.0
  Using cached Pillow-9.0.0-cp39-cp39-macosx_11_0_arm64.whl (2.7 MB)
Collecting requests<=2.27.1,>=2.26.0
  Using cached requests-2.27.1-py2.py3-none-any.whl (63 kB)
Collecting numpy<=1.22.1,>=1.21.4
  Using cached numpy-1.22.1-cp39-cp39-macosx_11_0_arm64.whl (12.8 MB)
Requirement already satisfied: pyshp==2.1.3 in ./miniconda3/envs/spyder-geo/lib/python3.9/site-packages (from cloupy) (2.1.3)
Requirement already satisfied: cycler==0.11.0 in ./miniconda3/envs/spyder-geo/lib/python3.9/site-packages (from cloupy) (0.11.0)
Collecting pyproj<=3.3.0,>=3.2.1
  Using cached pyproj-3.3.0.tar.gz (217 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [24 lines of output]
      <string>:9: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
      Traceback (most recent call last):
        File "/Users/andreacecilia/miniconda3/envs/spyder-geo/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/andreacecilia/miniconda3/envs/spyder-geo/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/Users/andreacecilia/miniconda3/envs/spyder-geo/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/private/var/folders/j8/z9z9dhys2sl71vnvnsbgn0780000gn/T/pip-build-env-36cst6x7/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/private/var/folders/j8/z9z9dhys2sl71vnvnsbgn0780000gn/T/pip-build-env-36cst6x7/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/j8/z9z9dhys2sl71vnvnsbgn0780000gn/T/pip-build-env-36cst6x7/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 480, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "/private/var/folders/j8/z9z9dhys2sl71vnvnsbgn0780000gn/T/pip-build-env-36cst6x7/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 232, in <module>
        File "<string>", line 160, in get_extension_modules
        File "<string>", line 23, in get_proj_version
        File "/Users/andreacecilia/miniconda3/envs/spyder-geo/lib/python3.9/subprocess.py", line 424, in check_output
          return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
        File "/Users/andreacecilia/miniconda3/envs/spyder-geo/lib/python3.9/subprocess.py", line 528, in run
          raise CalledProcessError(retcode, process.args,
      subprocess.CalledProcessError: Command '/Users/andreacecilia/miniconda3/envs/spyder-geo/bin/proj' returned non-zero exit status 1.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

疑问

我猜测可能是在Conda环境中使用pip的方式不正确,但不知道还有什么其他方法可以尝试。


内容的提问来源于stack exchange,提问作者Andrea

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.05 08:30:59