Error adding 'import lettuce' on PyCharm

6k Views Asked by At

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?

1

There are 1 best solutions below

0
On BEST ANSWER

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!