Code Monkey home page Code Monkey logo

Comments (15)

github-actions avatar github-actions commented on June 2, 2024

πŸ‘‹ Hello @marthemarwan, thank you for your interest in Ultralytics YOLOv8 πŸš€! We recommend a visit to the Docs for new users where you can find many Python and CLI usage examples and where many of the most common questions may already be answered.

If this is a πŸ› Bug Report, please provide a minimum reproducible example to help us debug it.

If this is a custom training ❓ Question, please provide as much information as possible, including dataset image examples and training logs, and verify you are following our Tips for Best Training Results.

Join the vibrant Ultralytics Discord 🎧 community for real-time conversations and collaborations. This platform offers a perfect space to inquire, showcase your work, and connect with fellow Ultralytics users.

Install

Pip install the ultralytics package including all requirements in a Python>=3.8 environment with PyTorch>=1.8.

pip install ultralytics

Environments

YOLOv8 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

Ultralytics CI

If this badge is green, all Ultralytics CI tests are currently passing. CI tests verify correct operation of all YOLOv8 Modes and Tasks on macOS, Windows, and Ubuntu every 24 hours and on every commit.

from ultralytics.

glenn-jocher avatar glenn-jocher commented on June 2, 2024

@marthemarwan hi there! I'm sorry to hear you're having trouble downloading the Ultralytics software on your MacBook. To better assist you, could you please provide a bit more detail about the specific errors you're encountering? This might be related to the installation commands you're using, Python version, or even some dependency issues.

In the meantime, here's a basic guide to install the Ultralytics YOLOv8 package using pip, which generally should work on a MacBook:

pip install ultralytics

Ensure that your Python and pip are up to date. You might also want to try creating a new virtual environment to avoid any conflicts with existing packages:

python -m venv yolov8-env
source yolov8-env/bin/activate
pip install ultralytics

Once you provide more specifics on the error messages or issues, I'll be better positioned to help you troubleshoot! Looking forward to your response. 😊

from ultralytics.

marthemarwan avatar marthemarwan commented on June 2, 2024

ok im using python version 3.12 and i tried other version liuke 3.9 , 3.11 and 3.10 but non of them seem to work. my pip is up to date and when i use pip install ultralytics it reaches the meta data download section and fails. here is a link of a screen recording to what is showing https://files.fm/u/exyh5hp3ap

from ultralytics.

glenn-jocher avatar glenn-jocher commented on June 2, 2024

Hi @marthemarwan! Thanks for the added details and the screen recording link. It sounds like there might be a network issue or a specific problem with the PyPI repository at the time of your installation attempts.

Here are a couple of suggestions:

  1. Temporary PyPI issue: Sometimes, the PyPI server may have temporary issues. You can wait a bit and try again later.
  2. Network Configuration: Check if there's a firewall, proxy, or VPN active that could block the connection to PyPI.

To further isolate this, you could also try installing a different package using pip to see if the issue is specific to the ultralytics package. For example:

pip install numpy

If this command succeeds without errors, it's likely an issue related specifically to the ultralytics package download at that time. Do keep us updated, and we'll work through this together! 😊

from ultralytics.

marthemarwan avatar marthemarwan commented on June 2, 2024

hi, i have been trying for the past month or two, yet it is the same.
regarding network, i have nothing downloaded, i hard reset the mac a while ago too
Any other library besides ultralytics works just fine pandas,numpy,cv2...

from ultralytics.

glenn-jocher avatar glenn-jocher commented on June 2, 2024

Hi @marthemarwan! It's puzzling that you're encountering issues specifically with the ultralytics package. Given your situation, you might want to try installing directly from the Ultralytics GitHub repository to see if that resolves the issue. Here’s how you can do it:

pip install git+https://github.com/ultralytics/ultralytics.git

This method bypasses PyPI and might help if the problem is related to the package's PyPI distribution. Let us know how it goes! 😊

from ultralytics.

marthemarwan avatar marthemarwan commented on June 2, 2024

same problem , (.venv) (base) mar@192 pythonProject4 % pip install git+https://github.com/ultralytics/ultralytics.git
Collecting git+https://github.com/ultralytics/ultralytics.git
Cloning https://github.com/ultralytics/ultralytics.git to /private/var/folders/rm/9lhc30013438hdfj_by74dmm0000gn/T/pip-req-build-_7x1apil
Running command git clone --filter=blob:none --quiet https://github.com/ultralytics/ultralytics.git /private/var/folders/rm/9lhc30013438hdfj_by74dmm0000gn/T/pip-req-build-_7x1apil
Resolved https://github.com/ultralytics/ultralytics.git to commit b6415e4
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting matplotlib>=3.3.0 (from ultralytics==8.2.10)
Obtaining dependency information for matplotlib>=3.3.0 from https://files.pythonhosted.org/packages/da/2b/2bb6073ca8d336da07ace7d98bf7bb9da8233f55876bb3db6a5ee924f3e9/matplotlib-3.8.4-cp312-cp312-macosx_11_0_arm64.whl.metadata
Using cached matplotlib-3.8.4-cp312-cp312-macosx_11_0_arm64.whl.metadata (5.8 kB)
Collecting opencv-python>=4.6.0 (from ultralytics==8.2.10)
Obtaining dependency information for opencv-python>=4.6.0 from https://files.pythonhosted.org/packages/77/df/b56175c3fb5bc058774bdcf35f5a71cf9c3c5b909f98a1c688eb71cd3b1f/opencv_python-4.9.0.80-cp37-abi3-macosx_11_0_arm64.whl.metadata
Using cached opencv_python-4.9.0.80-cp37-abi3-macosx_11_0_arm64.whl.metadata (20 kB)
Collecting pillow>=7.1.2 (from ultralytics==8.2.10)
Obtaining dependency information for pillow>=7.1.2 from https://files.pythonhosted.org/packages/5e/77/4cf407e7b033b4d8e5fcaac295b6e159cf1c70fa105d769f01ea2e1e5eca/pillow-10.3.0-cp312-cp312-macosx_11_0_arm64.whl.metadata
Using cached pillow-10.3.0-cp312-cp312-macosx_11_0_arm64.whl.metadata (9.2 kB)
Collecting pyyaml>=5.3.1 (from ultralytics==8.2.10)
Obtaining dependency information for pyyaml>=5.3.1 from https://files.pythonhosted.org/packages/84/02/404de95ced348b73dd84f70e15a41843d817ff8c1744516bf78358f2ffd2/PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl.metadata
Using cached PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl.metadata (2.1 kB)
Collecting requests>=2.23.0 (from ultralytics==8.2.10)
Obtaining dependency information for requests>=2.23.0 from https://files.pythonhosted.org/packages/70/8e/0e2d847013cb52cd35b38c009bb167a1a26b2ce6cd6965bf26b47bc0bf44/requests-2.31.0-py3-none-any.whl.metadata
Using cached requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
Collecting scipy>=1.4.1 (from ultralytics==8.2.10)
Using cached scipy-1.13.0.tar.gz (57.2 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error

Γ— Preparing metadata (pyproject.toml) did not run successfully.
β”‚ exit code: 1
╰─> [44 lines of output]
+ meson setup /private/var/folders/rm/9lhc30013438hdfj_by74dmm0000gn/T/pip-install-9fnye_59/scipy_0453f0fa8c694a5787e68ab65b072725 /private/var/folders/rm/9lhc30013438hdfj_by74dmm0000gn/T/pip-install-9fnye_59/scipy_0453f0fa8c694a5787e68ab65b072725/.mesonpy-ycma8pqf -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/private/var/folders/rm/9lhc30013438hdfj_by74dmm0000gn/T/pip-install-9fnye_59/scipy_0453f0fa8c694a5787e68ab65b072725/.mesonpy-ycma8pqf/meson-python-native-file.ini
The Meson build system
Version: 1.4.0
Source dir: /private/var/folders/rm/9lhc30013438hdfj_by74dmm0000gn/T/pip-install-9fnye_59/scipy_0453f0fa8c694a5787e68ab65b072725
Build dir: /private/var/folders/rm/9lhc30013438hdfj_by74dmm0000gn/T/pip-install-9fnye_59/scipy_0453f0fa8c694a5787e68ab65b072725/.mesonpy-ycma8pqf
Build type: native build
Project name: scipy
Project version: 1.13.0
C compiler for the host machine: cc (clang 12.0.5 "Apple clang version 12.0.5 (clang-1205.0.22.11)")
C linker for the host machine: cc ld64 650.9
C++ compiler for the host machine: c++ (clang 12.0.5 "Apple clang version 12.0.5 (clang-1205.0.22.11)")
C++ linker for the host machine: c++ ld64 650.9
Cython compiler for the host machine: cython (cython 3.0.10)
Host machine cpu family: aarch64
Host machine cpu: aarch64
Program python found: YES (/Users/mar/PycharmProjects/pythonProject4/.venv/bin/python)
Did not find pkg-config by name 'pkg-config'
Found pkg-config: NO
Run-time dependency python found: YES 3.12
Program cython found: YES (/private/var/folders/rm/9lhc30013438hdfj_by74dmm0000gn/T/pip-build-env-5cmdxwih/overlay/bin/cython)
Compiler for C supports arguments -Wno-unused-but-set-variable: NO
Compiler for C supports arguments -Wno-unused-function: YES
Compiler for C supports arguments -Wno-conversion: YES
Compiler for C supports arguments -Wno-misleading-indentation: YES
Library m found: YES

  ../meson.build:78:0: ERROR: Unknown compiler(s): [['gfortran'], ['flang'], ['nvfortran'], ['pgfortran'], ['ifort'], ['ifx'], ['g95']]
  The following exception(s) were encountered:
  Running `gfortran --version` gave "[Errno 2] No such file or directory: 'gfortran'"
  Running `gfortran -V` gave "[Errno 2] No such file or directory: 'gfortran'"
  Running `flang --version` gave "[Errno 2] No such file or directory: 'flang'"
  Running `flang -V` gave "[Errno 2] No such file or directory: 'flang'"
  Running `nvfortran --version` gave "[Errno 2] No such file or directory: 'nvfortran'"
  Running `nvfortran -V` gave "[Errno 2] No such file or directory: 'nvfortran'"
  Running `pgfortran --version` gave "[Errno 2] No such file or directory: 'pgfortran'"
  Running `pgfortran -V` gave "[Errno 2] No such file or directory: 'pgfortran'"
  Running `ifort --version` gave "[Errno 2] No such file or directory: 'ifort'"
  Running `ifort -V` gave "[Errno 2] No such file or directory: 'ifort'"
  Running `ifx --version` gave "[Errno 2] No such file or directory: 'ifx'"
  Running `ifx -V` gave "[Errno 2] No such file or directory: 'ifx'"
  Running `g95 --version` gave "[Errno 2] No such file or directory: 'g95'"
  Running `g95 -V` gave "[Errno 2] No such file or directory: 'g95'"
  
  A full log can be found at /private/var/folders/rm/9lhc30013438hdfj_by74dmm0000gn/T/pip-install-9fnye_59/scipy_0453f0fa8c694a5787e68ab65b072725/.mesonpy-ycma8pqf/meson-logs/meson-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.

[notice] A new release of pip is available: 23.2.1 -> 24.0
[notice] To update, run: pip install --upgrade pip
(.venv) (base) mar@192 pythonProject4 %

from ultralytics.

glenn-jocher avatar glenn-jocher commented on June 2, 2024

Hi @marthemarwan! It looks like the installation issue arises from scipy, which is a dependency of ultralytics. The error specifically mentions that the Fortran compiler (gfortran) isn't found, which is necessary to build scipy from source.

Here's a quick way to resolve this:

  1. Install the Fortran compiler required to build scipy. You can install gfortran on macOS using Homebrew:

    brew install gcc
  2. Try the installation of ultralytics again after installing gfortran. If it still doesn't work, consider installing scipy from a binary wheel that does not require compilation:

    pip install scipy --only-binary :all:
    pip install git+https://github.com/ultralytics/ultralytics.git

Please let me know if this helps or if you encounter any further issues! 😊

from ultralytics.

marthemarwan avatar marthemarwan commented on June 2, 2024

brew install gcc took almost 20 minutes to download but same again same error :(
🍺 /opt/homebrew/Cellar/gcc/13.2.0: 1,488 files, 372.9MB, built in 21 minutes 11 seconds
==> Running brew cleanup gcc...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see man brew).
Removing: /Users/mar/Library/Caches/Homebrew/gcc--patch--2df7ef067871a30b2531a2013b3db661ec9e61037341977bfc451e30bf2c1035.diff... (459.1KB)
Removing: /Users/mar/Library/Caches/Homebrew/gcc--patch--dcfec5f2209def06678fa9cf91bc7bbe38237f9f3a356a23ab66b84e88142b91.diff... (931B)
(base) (.venv) mar@192 pythonProject5 % pip install ultralytics
Collecting ultralytics
Using cached ultralytics-8.2.10-py3-none-any.whl.metadata (40 kB)
Collecting matplotlib>=3.3.0 (from ultralytics)
Using cached matplotlib-3.8.4-cp312-cp312-macosx_11_0_arm64.whl.metadata (5.8 kB)
Collecting opencv-python>=4.6.0 (from ultralytics)
Using cached opencv_python-4.9.0.80-cp37-abi3-macosx_11_0_arm64.whl.metadata (20 kB)
Collecting pillow>=7.1.2 (from ultralytics)
Using cached pillow-10.3.0-cp312-cp312-macosx_11_0_arm64.whl.metadata (9.2 kB)
Collecting pyyaml>=5.3.1 (from ultralytics)
Using cached PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl.metadata (2.1 kB)
Collecting requests>=2.23.0 (from ultralytics)
Using cached requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
Collecting scipy>=1.4.1 (from ultralytics)
Using cached scipy-1.13.0.tar.gz (57.2 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error

Γ— Preparing metadata (pyproject.toml) did not run successfully.
β”‚ exit code: 1
╰─> [48 lines of output]
+ meson setup /private/var/folders/rm/9lhc30013438hdfj_by74dmm0000gn/T/pip-install-bxl3y6gl/scipy_02c936f33bb145008ace60656493da9f /private/var/folders/rm/9lhc30013438hdfj_by74dmm0000gn/T/pip-install-bxl3y6gl/scipy_02c936f33bb145008ace60656493da9f/.mesonpy-cd46d6ei -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/private/var/folders/rm/9lhc30013438hdfj_by74dmm0000gn/T/pip-install-bxl3y6gl/scipy_02c936f33bb145008ace60656493da9f/.mesonpy-cd46d6ei/meson-python-native-file.ini
The Meson build system
Version: 1.4.0
Source dir: /private/var/folders/rm/9lhc30013438hdfj_by74dmm0000gn/T/pip-install-bxl3y6gl/scipy_02c936f33bb145008ace60656493da9f
Build dir: /private/var/folders/rm/9lhc30013438hdfj_by74dmm0000gn/T/pip-install-bxl3y6gl/scipy_02c936f33bb145008ace60656493da9f/.mesonpy-cd46d6ei
Build type: native build
Project name: scipy
Project version: 1.13.0
C compiler for the host machine: cc (clang 12.0.5 "Apple clang version 12.0.5 (clang-1205.0.22.11)")
C linker for the host machine: cc ld64 650.9
C++ compiler for the host machine: c++ (clang 12.0.5 "Apple clang version 12.0.5 (clang-1205.0.22.11)")
C++ linker for the host machine: c++ ld64 650.9
Cython compiler for the host machine: cython (cython 3.0.10)
Host machine cpu family: aarch64
Host machine cpu: aarch64
Program python found: YES (/Users/mar/PycharmProjects/pythonProject5/.venv/bin/python)
Did not find pkg-config by name 'pkg-config'
Found pkg-config: NO
Run-time dependency python found: YES 3.12
Program cython found: YES (/private/var/folders/rm/9lhc30013438hdfj_by74dmm0000gn/T/pip-build-env-f5kwp475/overlay/bin/cython)
Compiler for C supports arguments -Wno-unused-but-set-variable: NO
Compiler for C supports arguments -Wno-unused-function: YES
Compiler for C supports arguments -Wno-conversion: YES
Compiler for C supports arguments -Wno-misleading-indentation: YES
Library m found: YES
Fortran compiler for the host machine: gfortran (gcc 13.2.0 "GNU Fortran (Homebrew GCC 13.2.0) 13.2.0")
Fortran linker for the host machine: gfortran ld64 530
Compiler for Fortran supports arguments -Wno-conversion: YES
Compiler for C supports link arguments -Wl,-ld_classic: NO
Checking if "-Wl,--version-script" : links: NO
Program tools/generate_f2pymod.py found: YES (/Users/mar/PycharmProjects/pythonProject5/.venv/bin/python /private/var/folders/rm/9lhc30013438hdfj_by74dmm0000gn/T/pip-install-bxl3y6gl/scipy_02c936f33bb145008ace60656493da9f/tools/generate_f2pymod.py)
Program scipy/_build_utils/tempita.py found: YES (/Users/mar/PycharmProjects/pythonProject5/.venv/bin/python /private/var/folders/rm/9lhc30013438hdfj_by74dmm0000gn/T/pip-install-bxl3y6gl/scipy_02c936f33bb145008ace60656493da9f/scipy/_build_utils/tempita.py)
Program pythran found: YES 0.15.0 0.15.0 (/private/var/folders/rm/9lhc30013438hdfj_by74dmm0000gn/T/pip-build-env-f5kwp475/overlay/bin/pythran)
Found CMake: /opt/homebrew/bin/cmake (3.29.2)
WARNING: CMake Toolchain: Failed to determine CMake compilers state
Run-time dependency xsimd found: NO (tried pkgconfig, framework and cmake)
Run-time dependency threads found: YES
Library npymath found: YES
Library npyrandom found: YES
pybind11-config found: YES (/private/var/folders/rm/9lhc30013438hdfj_by74dmm0000gn/T/pip-build-env-f5kwp475/overlay/bin/pybind11-config) 2.12.0
Run-time dependency pybind11 found: YES 2.12.0
Run-time dependency scipy-openblas found: NO (tried pkgconfig)
Run-time dependency openblas found: NO (tried pkgconfig, framework and cmake)
Run-time dependency openblas found: NO (tried framework and cmake)

  ../scipy/meson.build:163:9: ERROR: Dependency lookup for OpenBLAS with method 'pkgconfig' failed: Pkg-config for machine host machine not found. Giving up.
  
  A full log can be found at /private/var/folders/rm/9lhc30013438hdfj_by74dmm0000gn/T/pip-install-bxl3y6gl/scipy_02c936f33bb145008ace60656493da9f/.mesonpy-cd46d6ei/meson-logs/meson-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.

from ultralytics.

marthemarwan avatar marthemarwan commented on June 2, 2024

Γ— Preparing metadata (pyproject.toml) did not run successfully.
β”‚ exit code: 1
╰─> [48 lines of output]

from ultralytics.

marthemarwan avatar marthemarwan commented on June 2, 2024

GNU Fortran (Homebrew GCC 13.2.0) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

fortran version ^

from ultralytics.

marthemarwan avatar marthemarwan commented on June 2, 2024

(.venv) (base) mar@Marwans-MacBook-Pro pythonProject4 % pip install scipy --only-binary :all:
ERROR: Could not find a version that satisfies the requirement scipy (from versions: none)
ERROR: No matching distribution found for scipy

from ultralytics.

glenn-jocher avatar glenn-jocher commented on June 2, 2024

Hi @marthemarwan! It seems like the issue might be related to your system architecture, compatibility, or the Python version you're running. Could you try specifying the platform and implementation when installing scipy, like so:

pip install --only-binary :all: --platform manylinux1_x86_64 --implementation cp scipy

If this doesn't solve the issue, confirming your Python version and the output of pip debug might help us troubleshoot further. Let's resolve this step by step! πŸ› οΈ

from ultralytics.

marthemarwan avatar marthemarwan commented on June 2, 2024

hello, i have solved the problem by downloading the packages, some packages were not supported by my mac version like homebrew so i used conda instead. I think the main reason for this problem was that my mac has not been updated since i got it back in 2021 which was around version 11. thank you for your help

from ultralytics.

glenn-jocher avatar glenn-jocher commented on June 2, 2024

Hi @marthemarwan! Great to hear that you've resolved the issue by switching to Conda and addressing compatibility with your macOS version. That's a smart move! πŸŽ‰ If you encounter any other issues or if there's more that you'd like to explore with YOLOv8, feel free to reach out. Happy coding! 😊

from ultralytics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.