I cannot import opencv-python in my project Pycharm

(myvenv) PS E:Python> pip install opencv-python
Collecting opencv-python
  Using cached opencv-python-4.10.0.84.tar.gz (95.1 MB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [66 lines of output]
      Ignoring numpy: markers 'python_version == "3.6" and platform_machine != "aarch64" and platform_machine != "arm64"' don't match your environment
      Ignoring numpy: markers 'python_version == "3.7" and platform_machine != "aarch64" and platform_machine != "arm64"' don't match your environment
      Ignoring numpy: markers 'python_version == "3.8" and platform_machine != "aarch64" and platform_machine != "arm64"' don't match your environment
      Ignoring numpy: markers 'python_version < "3.9" and sys_platform == "linux" and platform_machine == "aarch64"' don't match your environment   
      Ignoring numpy: markers 'python_version < "3.9" and sys_platform == "darwin" and platform_machine == "arm64"' don't match your environment    
      Collecting cmake>=3.1
        Using cached cmake-3.30.3.tar.gz (31 kB)
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
        Installing backend dependencies: started
        Installing backend dependencies: finished with status 'done'
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): finished with status 'done'
      Collecting numpy>=2.0.0
        Downloading numpy-2.0.2.tar.gz (18.9 MB)
           ---------------------------------------- 18.9/18.9 MB 3.2 MB/s eta 0:00:00
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
        Installing backend dependencies: started
        Installing backend dependencies: finished with status 'done'
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): finished with status 'error'
        error: subprocess-exited-with-error

        Preparing metadata (pyproject.toml) did not run successfully.
        exit code: 1

        [23 lines of output]
        + E:Pythonmyvenvbinpython.exe C:UsersadminAppDataLocalTemppip-install-nzei4sh_numpy_a368f9e2aa274993be96d795ef79ddd4vendored-mes
onmesonmeson.py setup C:UsersadminAppDataLocalTemppip-install-nzei4sh_numpy_a368f9e2aa274993be96d795ef79ddd4 C:UsersadminAppDataLocalT
emppip-install-nzei4sh_numpy_a368f9e2aa274993be96d795ef79ddd4.mesonpy-cclotgs2 -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:UsersadminAppDataLocalTemppip-install-nzei4sh_numpy_a368f9e2aa274993be96d795ef79ddd4.mesonpy-cclotgs2meson-python-native-file.ini     
        The Meson build system
        Version: 1.4.99
        Source dir: C:UsersadminAppDataLocalTemppip-install-nzei4sh_numpy_a368f9e2aa274993be96d795ef79ddd4
        Build dir: C:UsersadminAppDataLocalTemppip-install-nzei4sh_numpy_a368f9e2aa274993be96d795ef79ddd4.mesonpy-cclotgs2
        Build type: native build
        Project name: NumPy
        Project version: 2.0.2
        C compiler for the host machine: cc (gcc 12.1.0 "cc (Rev2, Built by MSYS2 project) 12.1.0")
        C linker for the host machine: cc ld.bfd 2.38
        C++ compiler for the host machine: c++ (gcc 12.1.0 "c++ (Rev2, Built by MSYS2 project) 12.1.0")
        C++ linker for the host machine: c++ ld.bfd 2.38
        Cython compiler for the host machine: cython (cython 3.0.11)
        Host machine cpu family: x86_64
        Host machine cpu: x86_64
        Program python found: YES (E:Pythonmyvenvbinpython.exe)
        Found pkg-config: YES (C:mingw64binpkg-config.EXE) 1.8.0
        Could not find Python3 library 'E:\Python\myvenv\lib\libpython3.9.dll.a'
        Run-time dependency python found: NO (tried pkgconfig, pkgconfig and sysconfig)

        ..meson.build:41:12: ERROR: Python dependency not found

        A full log can be found at C:UsersadminAppDataLocalTemppip-install-nzei4sh_numpy_a368f9e2aa274993be96d795ef79ddd4.mesonpy-cclotgs2meson-logsmeson-log.txt
        [end of output]

        note: This error originates from a subprocess, and is likely not a problem with pip.
      error: metadata-generation-failed

      Encountered error while generating package metadata.

      See above for output.

      note: This is an issue with the package mentioned above, not pip.
      hint: See above for details.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

I set cmake and I installed many times, it still does not run.

New contributor

Minh Quang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

3

Try to install setuptools pip install --upgrade pip setuptools wheel then try again. If not works sudo apt install python3-dev python3-pip python3-venv libopencv-dev python3-opencv install these system dependencies.

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật