12

I'm trying to import pycassa library in a Python project in Aptana 3, but in the line "import pycassa" it show me the next error: "Unresolved import: pycassa". I installed pycassa with easy install and if I run "import pycassa" in a python shell it run with no errors. If I run the Aptana project run with no errors too, but the error mark continues. Why?

Sorry for my english.

icor
  • 121
  • 1
  • 3

2 Answers2

5

The only working solution for me: open menu “Window” → “Preferences” → “Interpreter - Python”, then click button “Apply”, select your interpreter and then “OK”. Pydev will rescan all packages and in some seconds all unresolved imports disappear.

Unfortunately I have to do these steps on every restart because Pydev always “forget” some packages after restart…

Sergey Stolyarov
  • 2,587
  • 3
  • 27
  • 40
0

I had the same problem with Tastypie. I tried to add external library to project using Preferences-PyDev PUTHONPATH, but it didn't work for me...

But then I found solution: Window-Preferences-PyDev-Interpreter Python-Libraries-New folder (Button). Choose folder with needed library and Aptana should work fine then.

Demven Weir
  • 807
  • 7
  • 6