-1

I am a little bit confused....

I installed anaconda on my computer (I have windows 10). Normally, when I want to install a package I simply do "pip install package_name" or "conda install package_name" and it is done.

First question: what is the difference between pip and conda?

Now I tried to install xgboost and it was really complicated I tried lot of things nothings worked until I install something called miniconda.

There it works but now, when I do "conda install package_name" it install it in miniconda3/lib/site _package and I have to copy/paste it in Anaconda3/lib/site_package if I want it to work.

Second question: how can I ask to the computer that "conda install package_name" install it directly in anaconda3 and not miniconda3?

Finally I tried to install the package "surprise" for recommended systems. Both "pip install" or "conda install" failed.

I went in github and got the file "surprise" from https://github.com/NicolasHug/Surprise

I tried to copy it in Anaconda3/lib/site_package but it doesn't work.

When I do from surprise import Reader I did not get the error "no module name surprise" anymore but I get "cannot import name 'Reader'"

Last question: how can I make it work? I think I have to build it but I do not now how...

Thank you in advance for anyone that can explain all this for me :-)

Selim Yildiz
  • 5,254
  • 6
  • 18
  • 28
Anneso
  • 583
  • 2
  • 11
  • 20

2 Answers2

2

Similarly to you, I had issues installing the surprise package. I tried both pip install surprise and conda install surprise unsuccessfully.

conda install -c conda-forge scikit-surprise 
conda install -c conda-forge/label/gcc7 scikit-surprise 
conda install -c conda-forge/label/cf201901 scikit-surprise

I found those on the anconda website and the first one worked for me.

Hopefully this would help you as well

Gal Gilor
  • 31
  • 6
1

pip vs conda

pip is a package manager that facilitates installation, upgrade, and uninstallation of python packages. It also works with virtual python environments.

conda is a package manager for any software (installation, upgrade and uninstallation). It also works with virtual system environments.

Conda is a packaging tool and installr that aims to do more than what pip does; handle library dependencies outside of the Python packages as well as the Python packages themselves. Conda also creates a virtual environment, like virtualenv does.

For more see here

Anaconda vs miniconda

The open source version of Anaconda is an easy-to-install high performance Python and R distribution with a package manager, environment manager and collection of 720+ open source packages. It also comes with the options to install RStudio.

The "lite" version of Anaconda without the collection of 720 packages.
The downside is that you need to type in command line commands, "conda install PACKAGENAME"

And Last

To install this package with conda run:

conda install -c anaconda py-xgboost=0.60

Update for surprise

The easiest way is to use pip (you'll need numpy):

$ pip install numpy
$ pip install scikit-surprise

Or you can clone the repo and build the source (you'll need Cython and numpy):

$ git clone https://github.com/NicolasHug/surprise.git
$ python setup.py install
R.A.Munna
  • 1,699
  • 1
  • 15
  • 29
  • Thank you very muche for all those explanations. – Anneso Jul 19 '17 at 06:52
  • Just one last question you might be able to help me with... The package I want to install is "surprise" (to handle recommander systems) I try to run: - `conda install -c anaconda py-surprise` and I get `PackageNotFoundError: Package missing in current win-64 channels: - py-surprise` - `conda install -c anaconda surprise` and I get `PackageNotFoundError: Package missing in current win-64 channels: - surprise Close matches found; did you mean one of these? surprise: r-praise` – Anneso Jul 19 '17 at 06:58
  • Thanks. The link which you provided for `surprise` in your question there was a `README.md `. And here is given installation and usage guide. Please follow that. and also got https://github.com/NicolasHug/Surprise/issues/21 – R.A.Munna Jul 19 '17 at 08:08