1

In Pycharm, I have the following line:

from theano import function, config, shared, sandbox

The words function, config, shared and sandbox are underlined in red. And when I hover over them I get a "unnresolved reference" tooltip appearing.

The imports are valid and I can run the script. Why is the reference unresolved?

Ginger
  • 8,320
  • 12
  • 56
  • 99
  • Have you created and declared a [virtualenv](https://www.jetbrains.com/help/pycharm/2016.3/creating-virtual-environment.html) for your project? – Laurent LAPORTE Jan 08 '17 at 17:38
  • Maybe your `pycharm` settings are for the wrong python version, 2 instead of 3 or vice versa. –  Jan 08 '17 at 17:39
  • PyCharm should find `theano.compile.function` as well as `theano.function` (since `function` is imported in the `theano` namespace). This is a classic Python module, so it must work… – Laurent LAPORTE Jan 08 '17 at 17:44
  • Oops. Was my fault. I had put everything inside a folder called theano. I should not have named the folder theano. – Ginger Jan 08 '17 at 18:21
  • Possible duplicate of [Importing installed package from script raises "AttributeError: module has no attribute" or "ImportError: cannot import name"](http://stackoverflow.com/questions/36250353/importing-installed-package-from-script-raises-attributeerror-module-has-no-at) – Łukasz Rogalski Jan 08 '17 at 18:48

0 Answers0