Reputation: 982
So I'm trying to integrate plotly with my django app however I'm having an issue rendering a chart. I was using VSCode which did not pick up the dependency conflict.
However when i started to use Pycharm. It said my Dash was version 1.11 which satisfies the django-plotly-dash but did not satisfy the dash_bootstrap_components which required 2.0.0
I have now installed Dash version 1.10 which conflicts with both apps just to show the error message below:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following de
pendency conflicts.
django-plotly-dash 1.6.6 requires dash<1.21.0,>=1.11, but you have dash 1.10.0 which is incompatible.
dash-bootstrap-components 1.0.3 requires dash>=2.0.0, but you have dash 1.10.0 which is incompatible.
Any help is appreciated
As django-plotly-dash is on the latest version, i've decided to install dash 1.20 and downgrade by dash-bootstrap-components to 0.13.0 (https://github.com/facultyai/dash-bootstrap-components/releases?page=2)
This has worked like a charm.. weirdly - Pycharm has a reference error for the imports but visual studio code does not show any error and my program/script works perfectly. The pycharm import issue may be due to a setting in pycharm? idk
Upvotes: 10
Views: 79063
Reputation: 1970
The accepted solution can certainly help when the solution is possible (when the dependencies overlap).
A best practice, however, is to let pip's resolver do its job. As the error suggests, it can't take into consideration packages "that are [already] installed." To avoid this problem, install all of your packages in one command.
e.g.
Instead of...
pip install packageA
pip install packageB
pip install packageC
do...
pip install packageA packageB packageC
Using the first method, when installing packageC, pip can't reconcile dependencies required by packageA or packageB. Since they are already installed, it would be unacceptable behavior to re-install dependencies and their dependencies.
Doing them all together, gives pip the freedom to install all packages and their transient dependencies in a compatible combination.
That's assuming there is a compatible combination... 🤷.
Upvotes: 4
Reputation: 24
Before you install your extension, just follow the prompts
pip install h5py pip install typing-extensions pip install wheel
and then install your extension
Upvotes: -1
Reputation: 982
As django-plotly-dash is on the latest version, i've decided to install dash 1.20 and downgrade by dash-bootstrap-components to 0.13.0 (https://github.com/facultyai/dash-bootstrap-components/releases?page=2)
This has worked like a charm.. weirdly - Pycharm has a reference error for the imports but visual studio code does not show any error and my program/script works perfectly. The pycharm import issue may be due to a setting in pycharm? idk
Upvotes: 1
Reputation: 81
The simplest way to solve this issue is to install the compatible dash vision that is greater than 1.11 and less than 1.21.0.
Solution:
py -m pip install dash==1.20.0
Upvotes: 5