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.

Missing dependency definition - neither a requirements.txt nor a environment.yml

See original GitHub issue

Hi there,

May I kindly ask you to add a requirements.txt or environment.yml (with the later being prefered)? I am trying to get your code working and am running into multiple dependency issues, such as:

  • module not found errors for at least three packages, e.g., kornia
  • ImportError for inplace_abn, which might indicate an incompatible PyTorch version (ImportError: /mvsnerf/conda-env-py37/lib/python3.7/site-packages/inplace_abn/_backend.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZNK2at6Tensor3addEN3c106ScalarES2_)

Highly appreciated if you run something like conda env export --file environment.yml from within the active conda environment and add the file to the repository.

Thanks a lot!

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:5
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

9reactions
svipermcommented, Dec 28, 2021

Thanks @hengfei-wang for the tip. Thats problem with inplace_abn come from different cuda version of the system and cuda version of pytorch.

I tried to install pytorch + cudatoolkit==11.3 via conda, but in jupyter i had torch.cuda.is_available() == False

After installing all with pip works like a charm.

My installation process:

conda create -n mvsnerf python=3.8
conda activate mvsnerf
pip install torch==1.10.1+cu113 torchvision==0.11.2+cu113 torchaudio==0.10.1+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html
pip install pytorch-lightning==1.3.5 imageio pillow scikit-image opencv-python configargparse lpips kornia warmup_scheduler matplotlib

Installing inplace_abn from source

git clone https://github.com/mapillary/inplace_abn.git
cd inplace_abn
python setup.py install

Dear authors (@apchenstu), please check your repository and notebooks before you publish it, a lot of imports are missed, variables aren’t initiated, no dependencies file and full installation requirements. Running just single file become challenging!

2reactions
hengfei-wangcommented, Dec 20, 2021

Well, I used pip install pytorch-lightning==1.3.5 inplace_abn imageio pillow scikit-image opencv-python configargparse lpips kornia==0.5.11 warmup_scheduler to install packages. But I got ‘The CUDA version(11.5) detected is not the one used to compile pytorch(10.5)’ error when installing inpalce_abn. Sorry, I can’t remember exact output message. I guess pytorch-ligntning installs one version of torch compiled by CUDA 10.2 and inplace_abn detects this version and tries to use it. But it found the local cuda version dismatch with torch version, so it reports the error. I reinstalled pytorch using pip3 install torch==1.10.1+cu113 torchvision==0.11.2+cu113 torchaudio==0.10.1+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html to solve this problem.

Actually, I recommend to use anaconda to install packages in normal cases because conda is very good at managing dependies of different packages. However, there are some packages must be installed using pip in this project. Sad, I have to say using pip troubles me a lot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to install dependencies from requirements.txt as part ...
In my environment.yml I install some of the dependencies from a requirements.txt using pip . This part of the dependencies resolving fails with ......
Read more >
Why do people provide a requirements.txt or environment.yml ...
The dependencies in setup.py are much looser defined (typically only a minimum version and not always that) and typically only updated if I...
Read more >
Create conda environment from yml file without packages ...
If you do that, conda calls pip , but pip doesn't know how to satisfy missing dependencies with packages from Anaconda repositories.
Read more >
How I Manage Python Dependencies in Data Science Projects
The --prune argument makes conda remove packages that are not required anymore according to the dependency file. When omitted, conda only adds ...
Read more >
Manage dependencies using requirements.txt | IntelliJ IDEA ...
Define requirements  · From the Tools menu, select Sync Python Requirements. · In the opened dialog, specify the name of the requirements...
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