3

I have a problem with Python and lettuce.

I already install the pip and lettuce in Python 2.7, and I'm trying to create a .features file and a .py file for the steps. The problem is that when I put the line from lettuce import * I have an error that says:

"Unresolved reference lettuce..." and then: "this inspection detects names that should resolved but don't. Due to dynamic dispatch and duck typing, this is possible in a limited but useful number of cases. Top-level and class-level items are supported better than instance items".

I really don´t know how to fix this problem. Can anyone can help me please?

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
SomeAnonymousPerson
  • 3,173
  • 1
  • 21
  • 22
  • 1
    It's only PyCharm being daft, your code should still run. – Ffisegydd Dec 11 '14 at 11:54
  • What you mean? When I try to run the file I have an error saying `ImportError: No module named lettuce`. It doesn´t look like PyCharm in daft. Or maybe yes, but I still don´t know how to fix that – SomeAnonymousPerson Dec 12 '14 at 08:17

1 Answers1

3

I just found the problem. What I did, just in case anyone has the same problem is:

In my PyCharm project:

  • press Ctrl+Alt+s to open the settings
  • on the left column, select Project Interpreter
  • on the top right there is a list of python binaries found on your system, pick the right one
  • eventually click the + button to install additional python modules
  • validate

enter image description here

Just in case you are not able to add an other module (that happened to me as well) you can change the project interpreter.

Hope this works!

SomeAnonymousPerson
  • 3,173
  • 1
  • 21
  • 22