ultralytics / ultralytics

NEW - YOLOv8 πŸš€ in PyTorch > ONNX > OpenVINO > CoreML > TFLite
https://docs.ultralytics.com
GNU Affero General Public License v3.0
23.76k stars 4.74k forks source link

note: This is an issue with the package mentioned above, not pip. #11664

Open marthemarwan opened 1 week ago

marthemarwan commented 1 week ago

Search before asking

YOLOv8 Component

No response

Bug

im trying to download ultralytics on my macbook and my presentation is in 10 days i have tried everything but nothing is working someone help

Screen Shot 2024-05-06 at 12 34 45 AM

Environment

No response

Minimal Reproducible Example

No response

Additional

No response

Are you willing to submit a PR?

github-actions[bot] commented 1 week ago

πŸ‘‹ 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.

glenn-jocher commented 1 week ago

@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. 😊

marthemarwan commented 1 week ago

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

glenn-jocher commented 1 week ago

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! 😊

marthemarwan commented 1 week ago

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...

glenn-jocher commented 1 week ago

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! 😊

marthemarwan commented 1 week ago

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 b6415e4ef99a0a6447db85450dab2802df78da7a 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]

Γ— 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 %

glenn-jocher commented 1 week ago

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! 😊

marthemarwan commented 1 week ago

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]

Γ— 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.

marthemarwan commented 1 week ago

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

marthemarwan commented 1 week ago

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 ^

marthemarwan commented 1 week ago

(.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

glenn-jocher commented 1 week ago

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! πŸ› οΈ

marthemarwan commented 1 week ago

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

glenn-jocher commented 6 days ago

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! 😊