Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dependencies and packages conflicts in Anaconda?

I'm using Anaconda 5.1 and Python 3.6 on a Windows 10 machine.

I'm having quite a few problems ; I tried to add some useful tools such as lightGBM, tensorflow, keras, bokeh,... to my conda environment but once I've used

conda install -c conda-forge packagename

on all of these, I end up having downgrading and upgrading of different packages that just mess with my installation and I can't use anything anymore after those installations.

I wonder if it were possible to have multiples versions of packages & dependencies living alongside each other which won't kill my install?

Sorry if my question seems noobish and thanks for your help,

Nate

like image 880
Nathan Furnal Avatar asked Mar 19 '18 23:03

Nathan Furnal


People also ask

How does conda solve package conflict?

This can take several minutes. Press CTRL-C to abort Error Just create an env and activate that env and then do the install and your error will be solved. Here is commandline. To create env Use this command: conda create –name myenv Then do Activate env: conda activate myenv Now, Your error must be solved.

How do you resolve package conflict?

To resolve package conflicts: Update CustomizationPackage to be baselined off the attribute control in PatchPackage . The customization must be reapplied to the patched version of the attribute control. Install CustomizationPackage on top of (after) PatchPackage .

How do you resolve dependency conflicts in pip?

Unfortunately, pip makes no attempt to resolve dependency conflicts. For example, if you install two packages, package A may require a different version of a dependency than package B requires. Pip can install from either Source Distributions (sdist) or Wheel (. whl) files.


2 Answers

You could try disabling transitive deps updates by passing --no-update-dependencies or --no-update-deps to conda install command. Ex: conda install --no-update-deps pandas.

like image 148
Laksitha Ranasingha Avatar answered Oct 23 '22 12:10

Laksitha Ranasingha


Alright by searching around I was able to have everything up and running and it doesn't seem to be in conflict anymore, I had to uninstall Anaconda, reboot my computer and then reinstall it after my installation was broken though.

As long as packages and dependencies weren't messing around with each other, I was able to install lightgbm, folium and catboost in the regular (base) environment and use them. Those were installed straight with conda install -c conda-forge packagename, except for catboost which I linked. Do not forget to check for the different versions of conda, python and pip (wheel) which might affect your system.

Also, conda install nb_conda was installed to be able to select different environments in the Jupyter notebook straight away.

I got this from this helpful post and a mix of the answers below.

Then, when I wanted to install Tensorflow, Keras, theano what worked for me are the instructions in the second top comment in this thread though you should not forget to install jupyter again in the activated new environment you created.

After that, close everything, re-launch everything and in the top right corner of the Jupyter you should be able to pick the different environments and work from there.

I hope this will help someone else in the same predicament.

like image 21
Nathan Furnal Avatar answered Oct 23 '22 10:10

Nathan Furnal