question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to install ffcv via pip

See original GitHub issue

Unfortunately i am not able to install ffcv via pip in my environment. Following exceptions is raised during installation:

ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-bb88nk1n/ffcv/setup.py'"'"'; __file__='"'"'/tmp/pip-install-bb88nk1n/ffcv/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-bb88nk1n/ffcv/pip-egg-info cwd: /tmp/pip-install-bb88nk1n/ffcv/ Complete output (7 lines): Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-bb88nk1n/ffcv/setup.py", line 30, in <module> extension_kwargs = pkgconfig('opencv4', extension_kwargs) File "/tmp/pip-install-bb88nk1n/ffcv/setup.py", line 18, in pkgconfig raise Exception() Exception

The error may points to a missing installation of opencv4. But actually i have opencv-python==4.6.0.66 installed. Am i missing anything here?

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
richard-vockcommented, Jul 29, 2022

In my case a

apt install libturbojpeg0-dev libopencv-dev

(before pip/poetry install) fixed it. Note that installing libopencv-dev alone did not suffice.

0reactions
XksA-mecommented, Dec 22, 2022

In my case a

apt install libturbojpeg0-dev libopencv-dev

(before pip/poetry install) fixed it. Note that installing libopencv-dev alone did not suffice.

Thank you. This is effective. Complete steps: The virtual environment I created with conda is called myconda, python 3.9, cuda11.3, and I installed torch 1.12.1,

conda create -n myconda python=3.9
conda activate myconda
pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url  https://download.pytorch.org/whl/cu113

You can rent a machine in matpool.com and directly select the Python 1.12.1 environment for the above basic environment. They should also add an ffcv system environment based on this environment later.

The first step to install the system depends on:

apt update
apt install pkg-config libturbojpeg0-dev libopencv-dev -y

Step 2: Install Python dependencies:

pip install cupy-cuda113 numba

Step 3: Add environment variables (to~/. bashrc):

export LD_ LIBRARY_ PATH=/root/miniconda3/envs/myconda/lib:$LD_ LIBRARY_ PATH

Step 4:

source  ~/.bashrc
pip install ffcv
image
Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · libffcv/ffcv - GitHub
FFCV: Fast Forward Computer Vision (and other ML workloads!) ... Getting errors in FFCV import in macos with M1 chpi ... Unable to...
Read more >
Can't install via pip because of egg_info error - Stack Overflow
Found out what was wrong. I never installed the setuptools for python, so it was missing some vital files, like the egg ones....
Read more >
FFCV
Users can build their own compiled data transformations through a simple Python API, or just continue using standard PyTorch data transformations.
Read more >
jean-zay-users/jean-zay-doc - Gitter
Any idea why I obtain "ERROR: Could not install packages due to an OSError: [Errno 122] Disk quota exceeded " when doing pip...
Read more >
PyTorch on the HPC Clusters - Princeton Research Computing
OUTLINE Installation Example Job Data Loading using Multiple CPU-cores GPU Utilization Distributed Training or Using Multiple GPUs Building from Source ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found