ultralytics / ultralytics

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

Installing Ultralytics with system installed matplotlib - cannot import name 'rcParams' ifrom matplotlib,axes(in python_path.) #15439

Open programmeddeath1 opened 4 weeks ago

programmeddeath1 commented 4 weeks ago

Search before asking

Question

I am trying to create a pyinstaller executable for a pyqt application which uses YOLO model to send detections, and ros1 for the robot simulation. ROS 1 uses the system installed matplotlib installed in the /usr/lib/python3/dist-packages path.

When I install ultralytics, it installs maptlotlib to the user python directory at .local/lib/python3.8/site-packages.

When i build the pyinstaller executable, it finds matplotlib in two paths and thus does not install the matplotlib libraries properly in the executable. The app then fails during run with " cannot import name 'rcParams' ifrom matplotlib,axes(in python_path.) " when it runs

from ultralytics import YOLO

Is it possible to install ultalytics by making it use the system installed matplotlib? In this case then the user installation of matplotlib can be removed and the pyinstaller can add the system dependencies of maplotlib.

Additional

No response

github-actions[bot] commented 4 weeks ago

πŸ‘‹ Hello @programmeddeath1, 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.