17

Disclaimer: This is not about installing Anaconda packages in general. I know I can do this via cli. This is about installing them via PyCharm and the specific question is about how to add a repo. (Just saying.)


I want to use Anaconda in PyCharm, and the interpreter works, but not the package installing. When I press + in enter image description here I get enter image description here, which does not allow me to install new packages. Pressing "Manage Repositories" and then "+" gives me enter image description here so I suspect that I need to add a repository URL, but I could not find any information in the internet about what to enter. What am I supposed to do?


Because of

$ conda info
Using Anaconda Cloud api site https://api.anaconda.org
Current conda install:

             platform : linux-64
        conda version : 4.0.6
  conda-build version : 1.20.0
       python version : 2.7.11.final.0
     requests version : 2.7.0
     root environment : /Development/Anaconda-Python-Distribution/anaconda2  (writable)
  default environment : /Development/Anaconda-Python-Distribution/anaconda2
     envs directories : /Development/Anaconda-Python-Distribution/anaconda2/envs
        package cache : /Development/Anaconda-Python-Distribution/anaconda2/pkgs
         channel URLs : https://repo.continuum.io/pkgs/free/linux-64/
                        https://repo.continuum.io/pkgs/free/noarch/
                        https://repo.continuum.io/pkgs/pro/linux-64/
                        https://repo.continuum.io/pkgs/pro/noarch/
          config file : /home/user/.condarc
    is foreign system : False

I added

      https://repo.continuum.io/pkgs/free/linux-64/
      https://repo.continuum.io/pkgs/free/noarch/
      https://repo.continuum.io/pkgs/pro/linux-64/
      https://repo.continuum.io/pkgs/pro/noarch/

to "Manage Repositories", but when I pressed "Reload List of packages" in "Available Packages" I still did not get any packages.


EDIT:

Here is my settings window in 2017.3.4 Community Edition

enter image description here

Make42
  • 12,236
  • 24
  • 79
  • 155
  • I don't use PyCharm so I can't test this, but does this: https://repo.continuum.io/pkgs/free/linux-64 work? (make sure to sub in your actual OS) – darthbith Oct 31 '16 at 20:18
  • @darthbith: No, it did not (yes, I am using a 64-bit Linux indeed). Where did you get the link from? Source? – Make42 Oct 31 '16 at 20:48
  • `conda info` prints the URL of the repositories conda uses for channels. Maybe try `https://conda.anaconda.org/conda-forge/linux-64` – darthbith Nov 01 '16 at 13:28
  • @darthbith: I tried (see updated question), but it did not work. – Make42 Nov 01 '16 at 13:38
  • Did you try the `conda-forge` URL? It might be that the `repo.continuum.io` URLs require some validation that is possible in conda but not more generally. Sorry I don't use PyCharm and can't test this... – darthbith Nov 01 '16 at 13:42
  • @darthbith: Yes, I also added `https://conda.anaconda.org/conda-forge/linux-64`. – Make42 Nov 01 '16 at 13:50
  • I ran into same problem when trying to install a package. Finally fixed by installing the package by conda instead of adding repository in PyCharm. Also remember to remove the irrelevant repos before installing the package, e.g. the repo mentioned in previous comment: `https://conda.anaconda.org/conda-forge/linux-64` – Deqing Oct 07 '17 at 06:06
  • I've had the same problem; sadly, haven't found a resolution either... – jhaagsma Mar 19 '18 at 15:20

1 Answers1

1

You might have been using an older version at the time of posting, but in PyCharm 2017.3 there's a separate green Conda icon next to the plus button you clicked, and when clicked uses the Conda package manager.

enter image description here

opyate
  • 5,388
  • 1
  • 37
  • 64
  • 1
    As you can see in my edit to the question: I have the button, but it is not click-able. – Make42 Mar 27 '18 at 14:03
  • Perhaps because PyCharm is now already using the Conda package manager for that project. I think for a new project you ought to be able to click it once. – opyate Mar 27 '18 at 14:15
  • Yes, that is right. I am already using Conda package manager (I wasn't sure what the button was supposed to do). It seems that the issue from my question is partly resolved: I can see packages now and can install them. However, I just upgraded a package via PyCharm. Then I checked via command line with `conda list`, but there the package still has the old version number... – Make42 Mar 28 '18 at 09:53