-
Notifications
You must be signed in to change notification settings - Fork 860
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
About packages #896
Comments
In summary, the choice between
Consider your project requirements and the stability of the features you need when choosing between these two installation options. |
Thanks |
Would it be possible to have |
As far as I understand, The relationship between the base OpenCV package and the OpenCV-contrib-python package can sometimes lead to conflicts and confusion, but they serve different purposes:
The reason they are separate packages is to keep the core library lightweight and modular. However, it's possible to install both packages simultaneously, but they might not be compatible in some cases, as you've mentioned. To address your specific scenario:
Here's a simplified example of how you can create a virtual environment and install specific OpenCV packages: # Create a virtual environment for your first project
python -m venv project1-venv
source project1-venv/bin/activate
# Install the base OpenCV package
pip install opencv-python
# Do your work in this environment
# When done, deactivate the environment
deactivate
# Create a virtual environment for your second project
python -m venv project2-venv
source project2-venv/bin/activate
# Install the contrib OpenCV package
pip install opencv-contrib-python
# Do your work in this environment
# When done, deactivate the environment
deactivate This approach isolates dependencies for each project, preventing conflicts between the base and contrib OpenCV packages. |
I don't believe I explained the issue correctly, but how can you handle when one dependency needs |
How about we use containerization tools like Docker to isolate dependencies in separate containers. we can create two separate containers, each with its own OpenCV package, and run the respective dependency within its container. I think this approach allows us to keep the dependencies separate while still working within the same project. |
Sorry, when I say "project", I mean a single application, so it can't be separated. Basically, we are already using containers to run our application but we already have a dependency that uses |
I see...... I understand the problem.
This approach can be quite hacky and may not work perfectly in all cases, but I guess it can sometimes help in resolving conflicts. |
Can anyone explain me comparism of pip install opencv
vs pip install opencv-contrib-python
The text was updated successfully, but these errors were encountered: