[BUG] Conflicting Pip Requirements
winnieshen96 opened this issue · 1 comments
Description
In tools/environment.yml, there are conflicting library versions, which is
- tensorflow==2.0
- tensorboard==2.1.0
But when I try to change it to
- tensorflow==2.0
- tensorboard==2.0.2
there are other commands in the environment_setup.sh that caused error. Following the manual environment setup addressed the problem.
So I have solved the problems I encountered and provided my solutions below. This is just an issue to help other people who encounter the same problems as I did and also to urge the owner of this project to maintain it.
Bug 1
When running ./tools/environment_setup.sh, it must be running the following command when an error occured
conda env create -f tools/environment.yml
The error is as follows:
The conflict is caused by:
The user requested tensorboard==2.1.0
tensorflow 2.0.0 depends on tensorboard<2.1.0 and >=2.0.0
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
Pip subprocess error:
ERROR: Cannot install -r /mnt/batch/tasks/shared/LS_root/mounts/clusters/forecast/code/Users/HuiwenShen/forecasting/tools/condaenv.ft2s25c2.requirements.txt (line 5) and tensorboard==2.1.0 because these package versions have conflicting dependencies.
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
failed
CondaEnvException: Pip failed
Solution 1 & Bug 2
And in order to resolve the conflicts, I changed the environment.yml to
- tensorflow==2.0
- tensorboard==2.0.2
The above original error went away, but when the sh continued to run, another error occurs:
ERROR: Could not find a version that satisfies the requirement tensorflow==2.0 (from fclib==0.0.2) (from versions: 2.2.0rc1, 2.2.0rc2, 2.2.0rc3, 2.2.0rc4, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.3.0rc0, 2.3.0rc1, 2.3.0rc2, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.4.0rc0, 2.4.0rc1, 2.4.0rc2, 2.4.0rc3, 2.4.0rc4, 2.4.0, 2.4.1, 2.4.2, 2.5.0rc0, 2.5.0rc1, 2.5.0rc2, 2.5.0rc3, 2.5.0)
ERROR: No matching distribution found for tensorflow==2.0 (from fclib==0.0.2)
I think it's the output of the following command
pip install -e fclib
Solution 2
It turns out the following command in environment.yml failed.
# Activate conda environment
eval "$(conda shell.bash hook)" && conda activate forecasting_env
The error was "unbound variable".
Environment:
AzureML, where the default python version is 3.8, so I guess that was why all the tensorflow versions it provided are above 2.2.0.
After manually put in activate env, error 2 is gone.
Summary
You should update your library versions in the environment.yml file and fixed the buggy command in environment_setup.sh.
After I manually fixed all things mentioned above in solutions I can run the notebook in examples successfully.
will see if this is resolved in lastest dep updates.