Project Interpreter - Nothing to show - Conda

Answered

HI @all,

I create a new project and choose "Create Conda Env" as interpreter with Python Version = 3.4.

Then I open settings and go to Project Interperter and press "Install" (green + on the top right corner). 

Any package that I install e.g. flask or pandas CAN be installed and I receive the message "Packages installed succesfully...." However, these packages will NOT be displayed in the Settings. There it Says  "Nothing to show"

If I use older environments, the packages will be displayed correctly. Also checking with conda or anaconda, the packages will be displayed. Besides I can use the packages in PyCharm, they are just not shown!

The "Interpreter Paths" ar set correctly (at least from my prospective) including DLLs, Lib and Lib\site-packages, however I had to set them manually.

 

The whole thing is problematic because there is no autocompletioin, instead I get "Unresolved Reverence" - remember, I can load everything, also interactive into the python console.

An related Error I get using flask in interactive mode:

from flask import Flask
app = Flask(__name__)

Traceback (most recent call last):
File "<input>", line 2, in <module>
File "C:\...\lib\site-packages\flask\app.py", line 346, in __init__
root_path=root_path)
File "C:\...\lib\site-packages\flask\helpers.py", line 807, in __init__
root_path = get_root_path(self.import_name)
File "C:\..\lib\site-packages\flask\helpers.py", line 685, in get_root_path
'provided.' % import_name)
RuntimeError: No root path can be found for the provided module "builtins". This can happen because the module came from an import hook that does not provide file name information or because it's a namespace package. In this case the root path needs to be explicitly provided.

 

Please help. Thank you!

 

 

 

14 comments

Could you please specify your Pycharm version? Are you able to reproduce the problem with the latest Pycharm 2016.2?

0

Hi Anna,

this problem still shows up for my old projects using PyCharm 2016.2. However, if I start a new project with PyCharm 2016.2 using the same way as described above, it'll show the expected outcome.

I guess there is no immediate help for the old Project?

Bye

Christof

0

For specification I'd like to add, that the "nothing to show" problem occurs when cloning a git repository.

0

I'm also seeing this issue with PyCharm 2016.2 and with a new project that I started just yesterday using 2016.2 version.  One thing I did change today though was my default python runtime from Homebrew Python to Miniconda as I'm moving over to the simpler and more powerful Conda for managing packages (including Python versions) + envs.

Note, this is also a cloned Git repo as well..

1

I'm seeing something similar in 2016.2... created a conda environment, go to add packages via the PyCharm interface... nothing, and I mean *nothing* is available, findable... nothing.  I can add packages manually from the command line using conda, but inside PyCharm... it *still* doesn't work.

 

1

I'm also using 2016.2 and suddenly seeing errors about package requirements not being met and "nothing to show" under the project interpreter that I've been using all along (~/anaconda/bin/python, v 2.7.11). Using "conda list" shows all the expected installed packages, but the preferences window under PyCharm shows nothing. 

I tried invalidating caches & restarting, but still "nothing to show".

1

The problem persists on PyCharm 2017.3.3 (Professional Edition).

0

Could you please share idea.log ("Help | Show Log in...") after restarting IDE and reproducing the issue? You could use any online service or our  FTP: https://intellij-support.jetbrains.com/hc/en-us/articles/207241235-Reporting-performance-problems

0

Sorry for the delay. What is the file name. Is it just idea.log?

0

Do you use Conda? From the log system interpreter is used and there are no records about installing packages.

0

It's possible that I'm confusing something. So, I will just write the steps to reproduce the problem:

1) In PyCharm: File -> New Project -> [Pure Python, New environment using Conda] -> Create

2) When new project is created: File -> Settings -> Project: <project_name> -> Project Interpreter -> click on "+" - will open new window called "Available Packages".

And this is it. It says "Nothing to show" and I can't install anything from there. 

Also, whenever I click on "+", following traceback appears in idea.log:

"""

2018-03-12 14:21:58,083 [19982544] INFO - packaging.PyPackageManagerImpl - Running packaging tool: C:\Users\Georgy\Miniconda3\envs\hello\python.exe C:\Program Files\JetBrains\PyCharm 2017.3.3\helpers\packaging_tool.py list
2018-03-12 14:21:58,621 [19983082] WARN - ackaging.PyCondaPackageService - Failed to get list of conda packages
2018-03-12 14:21:58,622 [19983083] WARN - ackaging.PyCondaPackageService - C:/Users/Georgy/Miniconda3/python.exe C:\Program Files\JetBrains\PyCharm 2017.3.3\helpers\conda_packaging_tool.py listall
2018-03-12 14:21:58,622 [19983083] WARN - ackaging.PyCondaPackageService - Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2017.3.3\helpers\conda_packaging_tool.py", line 14, in do_list_available_packages
from conda.cli.main_search import common
ImportError: cannot import name 'common'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2017.3.3\helpers\conda_packaging_tool.py", line 18, in do_list_available_packages
from conda.cli.main_search import get_index
ImportError: cannot import name 'get_index'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2017.3.3\helpers\conda_packaging_tool.py", line 51, in main
do_list_available_packages()
File "C:\Program Files\JetBrains\PyCharm 2017.3.3\helpers\conda_packaging_tool.py", line 21, in do_list_available_packages
from conda.api import get_index
ImportError: cannot import name 'get_index'

"""

I hope this helps.

0

Thanks for detailed information. Seems your log files was overriden on FTP, so I checked wrong one. Seems you face issue described here: https://youtrack.jetbrains.com/issue/PY-22517. Please check the issue with 2018.1 EAP: https://www.jetbrains.com/pycharm/nextversion/

0

Please sign in to leave a comment.