Open clockwiser opened 7 years ago
The check does nothing more than trying to import cv2
, which is required for the library. I don't use Anaconda, but all guides that I see look like it also should have a cv2
package if opencv is installed, i.e. you should be able to do import cv2
without an error. Are you sure it is installed correctly?
Anaconda has opencv and import cv2 has no problem. Only when installing imgaug, error happens.
Tried all commands described as below, same errors.
To install, simply use sudo pip install imgaug. That version might be outdated though. To always get the newest version directly from github use sudo pip install git+https://github.com/aleju/imgaug. Alternatively, you can download the repository via git clone https://github.com/aleju/imgaug and install by using python setup.py sdist && sudo pip install dist/imgaug-0.2.0.tar.gz.
A closed issue #12 says:
You can now simply install via sudo pip install imgaug or sudo pip install git+https://github.com/aleju/imgaug.
Looks ok with Anaconda?
If importing cv2
works in your python scripts but not during the installation, it might be that your pip
command does not use your anaconda installation of python (but instead a different one that doesn't have opencv). The help threads that I can find sound like which pip
should return something like /home/username/anaconda/bin
.
Solved.
Find the Anaconda envirenment name conda info --envs
Activate anaconda environment. source activate enviroment-name
Install imgaug using pip. pip install git+https://github.com/aleju/imgaug
Note: don't use 'sudo pip', which causes the error.
install opencv2 to anaconda conda install -c menpo opencv=2.4.11
pip install git+https://github.com/aleju/imgaug
Solved.
- Find the Anaconda envirenment name conda info --envs
- Activate anaconda environment. source activate enviroment-name
- Install imgaug using pip. pip install git+https://github.com/aleju/imgaug
Note: don't use 'sudo pip', which causes the error.
Additionally, if you use ipython or jupyter notebook environment, you should install the environment in conda virtual environment.
conda install ipython jupyter
then running on the environment. If you skip this process, jupyter or ipython would running on your global environment so that it can't import the package.
from conda-forge conda install -c conda-forge imgaug
then it will install by anaconda
When run the setup, error happens. opencv is installed on Anaconda. Is it possible to install imgaug on Anaconda? ... Processing ./dist/imgaug-0.2.0.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in
File "/tmp/pip-K5MRPU-build/setup.py", line 6, in
raise Exception("Could not find package 'cv2' (OpenCV). It cannot be automatically installed, so you will have to manually install it.")
Exception: Could not find package 'cv2' (OpenCV). It cannot be automatically installed, so you will have to manually install it.