Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I install on Ubuntu 18.04? #108

Open
connormeaton opened this issue Feb 9, 2021 · 0 comments
Open

How do I install on Ubuntu 18.04? #108

connormeaton opened this issue Feb 9, 2021 · 0 comments

Comments

@connormeaton
Copy link

When I run the suggested command, I get this error:

$ pip3 install mtcnn


Collecting mtcnn
  Downloading https://files.pythonhosted.org/packages/67/43/abee91792797c609c1bf30f1112117f7a87a713ebaa6ec5201d5555a73ef/mtcnn-0.1.0-py3-none-any.whl (2.3MB)
    100% |████████████████████████████████| 2.3MB 604kB/s 
Collecting opencv-python>=4.1.0 (from mtcnn)
  Using cached https://files.pythonhosted.org/packages/bb/08/9dbc183a3ac6baa95fabf749ddb531bd26256edfff5b6c2195eca26258e9/opencv-python-4.5.1.48.tar.gz
Collecting keras>=2.0.0 (from mtcnn)
  Downloading https://files.pythonhosted.org/packages/44/e1/dc0757b20b56c980b5553c1b5c4c32d378c7055ab7bfa92006801ad359ab/Keras-2.4.3-py2.py3-none-any.whl
Collecting numpy>=1.13.3 (from opencv-python>=4.1.0->mtcnn)
  Using cached https://files.pythonhosted.org/packages/45/b2/6c7545bb7a38754d63048c7696804a0d947328125d81bf12beaa692c3ae3/numpy-1.19.5-cp36-cp36m-manylinux1_x86_64.whl
Collecting pyyaml (from keras>=2.0.0->mtcnn)
  Downloading https://files.pythonhosted.org/packages/7a/5b/bc0b5ab38247bba158504a410112b6c03f153c652734ece1849749e5f518/PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl (640kB)
    100% |████████████████████████████████| 645kB 2.1MB/s 
Collecting scipy>=0.14 (from keras>=2.0.0->mtcnn)
  Using cached https://files.pythonhosted.org/packages/c8/89/63171228d5ced148f5ced50305c89e8576ffc695a90b58fe5bb602b910c2/scipy-1.5.4-cp36-cp36m-manylinux1_x86_64.whl
Collecting h5py (from keras>=2.0.0->mtcnn)
  Downloading https://files.pythonhosted.org/packages/70/7a/e53e500335afb6b1aade11227cdf107fca54106a1dca5c9d13242a043f3b/h5py-3.1.0-cp36-cp36m-manylinux1_x86_64.whl (4.0MB)
    100% |████████████████████████████████| 4.0MB 362kB/s 
Collecting cached-property; python_version < "3.8" (from h5py->keras>=2.0.0->mtcnn)
  Downloading https://files.pythonhosted.org/packages/48/19/f2090f7dad41e225c7f2326e4cfe6fff49e57dedb5b53636c9551f86b069/cached_property-1.5.2-py2.py3-none-any.whl
Building wheels for collected packages: opencv-python
  Running setup.py bdist_wheel for opencv-python ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-dzjs1nf_/opencv-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmplsl7vw2mpip-wheel- --python-tag cp36:
  Traceback (most recent call last):
    File "/home/ubuntu/.local/lib/python3.6/site-packages/skbuild/setuptools_wrap.py", line 560, in setup
      cmkr = cmaker.CMaker(cmake_executable)
    File "/home/ubuntu/.local/lib/python3.6/site-packages/skbuild/cmaker.py", line 95, in __init__
      self.cmake_version = get_cmake_version(self.cmake_executable)
    File "/home/ubuntu/.local/lib/python3.6/site-packages/skbuild/cmaker.py", line 82, in get_cmake_version
      "Problem with the CMake installation, aborting build. CMake executable is %s" % cmake_executable)
  
  Problem with the CMake installation, aborting build. CMake executable is cmake
  
  ----------------------------------------
  Failed building wheel for opencv-python
  Running setup.py clean for opencv-python
Failed to build opencv-python
Installing collected packages: numpy, opencv-python, pyyaml, scipy, cached-property, h5py, keras, mtcnn
  Running setup.py install for opencv-python ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-dzjs1nf_/opencv-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-hs7o4egq-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
    Traceback (most recent call last):
      File "/home/ubuntu/.local/lib/python3.6/site-packages/skbuild/setuptools_wrap.py", line 560, in setup
        cmkr = cmaker.CMaker(cmake_executable)
      File "/home/ubuntu/.local/lib/python3.6/site-packages/skbuild/cmaker.py", line 95, in __init__
        self.cmake_version = get_cmake_version(self.cmake_executable)
      File "/home/ubuntu/.local/lib/python3.6/site-packages/skbuild/cmaker.py", line 82, in get_cmake_version
        "Problem with the CMake installation, aborting build. CMake executable is %s" % cmake_executable)
    
    Problem with the CMake installation, aborting build. CMake executable is cmake
    
    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-dzjs1nf_/opencv-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-hs7o4egq-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-dzjs1nf_/opencv-python/

I had this same error when trying to pip install opencv-python. However, I resolved the issue by running sudo apt install python3-opencv successfully. The mtcnn packages tries to reinstall opencv with the pip method that fails. How do I get around this issue?

I am on an aws ec2 ubuntu 18.04.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant