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

重装Ubuntu 14.04 LTS系统时安装rawpy失败,提示文件不存在

Fixing rawpy Installation Failure on Ubuntu 14.04 LTS

Hey there, I’ve dealt with this exact "rawpy/_rawpy.c: No such file or directory" error when installing rawpy on Ubuntu 14.04 before—let’s break down the fixes that got it working for me. The core issue here is that rawpy relies on compiling a C extension, which requires specific system dependencies and an up-to-date packaging toolchain.

Step 1: Install Required System Dependencies

First, you need to install the compilers and development libraries that rawpy’s C extension needs to build. Run this command to grab everything:

sudo apt-get update && sudo apt-get install gcc python-dev libraw-dev
  • gcc: The C compiler needed to build the extension
  • python-dev: Header files for Python’s C API (required to compile Python extensions)
  • libraw-dev: Development files for the LibRaw library, which rawpy wraps around

If you’re using Python 3 instead of the default Python 2.7 on Ubuntu 14.04, swap out python-dev for python3-dev:

sudo apt-get install gcc python3-dev libraw-dev

Step 2: Upgrade pip and Setuptools

Ubuntu 14.04 comes with a pretty outdated version of pip, which can cause issues when handling source distributions like rawpy. Upgrade these tools first:

sudo pip install --upgrade pip setuptools

For Python 3, use pip3 instead:

sudo pip3 install --upgrade pip setuptools

Step 3: Install rawpy

Now that your environment is set up, try installing rawpy again:

pip install rawpy

Or for Python 3:

pip3 install rawpy

If You Still Run Into Issues

If the above steps don’t work, try installing directly from the rawpy source to ensure the files are properly extracted:

  1. Download the source tarball (use wget to grab it directly):
    wget https://files.pythonhosted.org/packages/source/r/rawpy/rawpy-0.17.1.tar.gz
    
    Note: Replace the version number with the latest available that supports Python 2.7/3.4 (Ubuntu 14.04’s default Python versions)
  2. Extract the tarball and navigate into the directory:
    tar -xzf rawpy-0.17.1.tar.gz && cd rawpy-0.17.1
    
  3. Build and install the package:
    python setup.py install
    
    Again, use python3 if you’re targeting Python 3.

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.19 04:07:14