ModuleNotFoundError: No module named 'albumentations'

3.7k Views Asked by At

I tried to install this package of 'albumentations' through

pip install --upgrade albumentations and pip install albumentations --user

Python version 3.9.0, on a local machine (not in Google Colab or Kaggle).

It installs:

Successfully installed albumentations-1.3.1 imageio-2.31.1 joblib-1.3.1 lazy_loader-0.3 opencv-python-headless-4.8.0.74 qudida-0.0.4 scikit-image-0.21.0 scikit-learn-1.3.0

But still, it shows:

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[16], line 3
      1 # ! pip install --upgrade albumentations
      2 get_ipython().system(' pip install albumentations --user')
----> 3 import albumentations
      4 import albumentations.pytorch

ModuleNotFoundError: No module named 'albumentations'

What should I do to install this?

2

There are 2 best solutions below

0
Abdurrahman On

I faced the same issue. I restarted the kernel after pip install albumentations --user and it works

0
Prajot Kuvalekar On

Can you try

python -m pip install albumentations