Unresolved import: models - python

I'm doing my VERY first project using python/django/eclipse/pydev following this guide
http://docs.djangoproject.com/en/dev/intro/tutorial01/
My only addition is the use of Eclipse/pydev.
I'm getting many errors related to "Unresolved imports". I can remove the errors using "remove error markers" and my site runs perfect (I can browse it) but I want to get rid definitively of this problem since errors pop up again after I removed them.
Any ideas?
EDIT
Using Ubuntu 9.1

Check your pythonpath. You need to include the parent directory of django, usually Lib/site-packages.

I'm on Mac OS X, but all I had to do was to add:
/Library/Python/2.6/site-packages
to my System PYTHONPATH (Found in: Preferences > Pydev > Interpreter - Python)
The equivalent for Ubuntu 10.04 would be:
/usr/lib/pymodules/python2.6
I'm guessing that the equivalent for Ubuntu 9.x could be:
/usr/lib/python2.6/site-packages
If it isn't and you're tired of looking, just upgrade to Ubuntu 10.04 and you should be fine.

I was able to get rid of the import errors executing this cmd
sudo ln -s /usr/lib/pymodules/ /usr/lib/python2.6/pymodules
I was lucky, testing different things I could resolve it but I'm not sure why I have to do this and how I could avoid doing it.

"Unresolved imports" occur when Eclipse/Pydev does not know what you want to import. Check your Pydev settings in the Eclipse preferences > Interpreter Python. Your site-packages folder and things you want to import should be there in the Pythonpath.
Also see http://pydev.org/manual_101_interpreter.html

Even if Lib/site-packages is added to the PYTHONPATH, this problem may happen when using modules from egg packages installed using easy_install. The problem with those, and that might actually depend on the easy_install version, is that by default they don't get installed directly inside Lib/site-packages but rather under a folder containing the full package name and having the .egg suffix. For example: Lib/site-packages/django_celery-3.0.23-py2.7.egg
Each module coming from packages installed as above needs an individual entry in PYTHONPATH. If the packages are installed after PyDev has been installed on the system, the system PYTHONPATH needs to be updated in PyDev. That is done automatically by going to Window -> Preferences -> PyDev -> Select your intepreter -> in the python interpreters panel remove and re-add your current python interpreter (usually, this should be the python executable from the system). Then a PyDev restart (File -> Restart) should solve the "Unresolved import" errors.

If you are facing problem of unused imports then I must say use Eclipse as a IDE as it is providing functionality to remove unused imports by pressing keys ctr+shift+O. Or In Eclipse there is plugin also available which is doing the same thing automatically when you save your code.You can get that plugin from eclipse plugin site easily and free of cost.

In my case of the modules were dependent on setuptools-14.3.1 , which was causing all these problems. After installation of setuptools-14.3.1 rest of the modules automatically resolved.

I was having a single import error when working in PyDEV in eclipse.
I was importing it like
from xyz_module import abc
So I clicked "Ctl + 1" and "select Unresolved import error" in eclipse and it created a class
file in a python file.
It turned out that I had created an application called "xyz_module" and a "xyz_module.py" file (with the same name that is) and this was causing an import error. I changed the python file to a new name and this resolved the error.

I had the same error and none of the answers worked for me as there was no PYTHONPATH options under Window -> Preferences -> PyDev -> Python.
Instead I added PYTHONPATH setting in the menu:
Project -> PyDev-PYTHONPATH -> External Libraries -> Add Source folder
I added the path of site-packages like
/home/Documents/hcx/venv/lib/python3.5/site-packages
Now PyDev stopped complaining.

Related

I keep getting this error on every IDE: ModuleNotFoundError: No module named 'pygame' [duplicate]

I'm having trouble with using 'requests' module on my Mac. I use python34 and I installed 'requests' module via pip. I can verify this via running installation again and it'll show me that module is already installed.
15:49:29|mymac [~]:pip install requests
Requirement already satisfied (use --upgrade to upgrade): requests in /opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages
Although I can import 'requests' module via interactive Python interpreter, trying to execute 'import requests' in PyCharm yields error 'No module named requests'. I checked my PyCharm Python interpreter settings and (I believe) it's set to same python34 as used in my environment. However, I can't see 'requests' module listed in PyCharm either.
It's obvious that I'm missing something here. Can you guys advise where should I look or what should I fix in order to get this module working? I was living under impression that when I install module via pip in my environment, PyCharm will detect these changes. However, it seems something is broken on my side ...
In my case, using a pre-existing virtualenv did not work in the editor - all modules were marked as unresolved reference (running naturally works, as this is outside of the editor's config, just running an external process (not so easy for debugging)).
Turns out PyCharm did not add the site-packages directory... the fix is to manually add it.
On Pycharm professional 2022.3
Open File -> Settings -> Python Interpreter, open the drop-down and pick "Show All..." (to edit the config) (1), right click your interpreter (2), click "Show Interpreter Paths" (3).
In that screen, manually add the "site-packages" directory of the virtual environment [looks like .../venv/lib/python3.8/site-packages (4) (I've added the "Lib" also, for a good measure); once done and saved, they will turn up in the interpreter paths.
The other thing that won't hurt to do is select "Associate this virtual environment with the current project", in the interpreter's edit box.
If you are using PyCharms CE (Community Edition), then click on:
File->Default Settings->Project Interpreter
See the + sign at the bottom, click on it. It will open another dialog with a host of modules available. Select your package (e.g. requests) and PyCharm will do the rest.
This issue arises when the package you're using was installed outside of the environment (Anaconda or virtualenv, for example). In order to have PyCharm recognize packages installed outside of your particular environment, execute the following steps:
Go to
Preferences -> Project -> Project Interpreter -> 3 dots -> Show All ->
Select relevant interpreter -> click on tree icon Show paths for the selected interpreter
Now check what paths are available and add the path that points to the package installation directory outside of your environment to the interpreter paths.
To find a package location use:
$ pip show gym
Name: gym
Version: 0.13.0
Summary: The OpenAI Gym: A toolkit for developing and comparing your reinforcement learning agents.
Home-page: https://github.com/openai/gym
Author: OpenAI
Author-email: gym#openai.com
License: UNKNOWN
Location: /usr/local/lib/python3.7/site-packages
...
Add the path specified under Location to the interpreter paths, here
/usr/local/lib/python3.7/site-packages
Then, let indexing finish and perhaps additionally reopen your project.
Open python console of your pyCharm. Click on Rerun.
It will say something like following on the very first line
/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 /Applications/PyCharm.app/Contents/helpers/pydev/pydevconsole.py 52631 52632
in this scenario pyCharm is using following interpretor
/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Now fire up console and run following command
sudo /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 -m pip install <name of the package>
This should install your package :)
Pycharm is unable to recognize installed local modules, since python interpreter selected is wrong. It should be the one, where your pip packages are installed i.e. virtual environment.
I had installed packages via pip in Windows. In Pycharm, they were neither detected nor any other Python interpreter was being shown (only python 3.6 is installed on my system).
I restarted the IDE. Now I was able to see python interpreter created in my virtual environment. Select that python interpreter and all your packages will be shown and detected. Enjoy!
Using dual python 2.7 and 3.4 with 2.7 as default, I've always used pip3 to install modules for the 3.4 interpreter, and pip to install modules for the 2.7 interpreter.
Try this:
pip3 install requests
This is because you have not selected two options while creating your project:-
** inherit global site packages
** make available to all projects
Now you need to create a new project and don't forget to tick these two options while selecting project interpreter.
The solution is easy (PyCharm 2021.2.3 Community Edition).
I'm on Windows but the user interface should be the same.
In the project tree, open External libraries > Python interpreter > venv > pyvenv.cfg.
Then change:
include-system-site-packages = false
to:
include-system-site-packages = true
Before going further, I want to point out how to configure a Python interpreter in PyCharm: [SO]: How to install Python using the "embeddable zip file" (#CristiFati's answer). Although the question is for Win, and has some particularities, configuring PyCharm is generic enough and should apply to any situation (with minor changes).
There are multiple possible reasons for this behavior.
1. Python instance mismatch
Happens when there are multiple Python instances (installed, VEnvs, Conda, custom built, ...) on a machine. Users think they're using one particular instance (with a set of properties (installed packages)), but in fact they are using another (with different properties), hence the confusion. It's harder to figure out things when the 2 instances have the same version (and somehow similar locations)
Happens mostly due to environmental configuration (whichever path comes 1st in ${PATH}, aliases (on Nix), ...)
It's not PyCharm specific (meaning that it's more generic, also happens outside it), but a typical PyCharm related example is different console interpreter and project interpreter, leading to confusion
The fix is to specify full paths (and pay attention to them) when using tools like Python, PIP, .... Check [SO]: How to install a package for a specific Python version on Windows 10? (#CristiFati's answer) for more details
This is precisely the reason why this question exists. There are 2 Python versions involved:
Project interpreter: /Library/Frameworks/Python.framework/Versions/3.4
Interpreter having the Requests module: /opt/local/Library/Frameworks/Python.framework/Versions/3.4
well, assuming the 2 paths are not somehow related (SymLinked), but in latest OSX versions that I had the chance to check (Catalina, Big Sur, Monterey) this doesn't happen (by default)
When dealing with this kind of error, it always helps (most likely) displaying the following information (in a script or interpreter console):
import os
import sys
print(sys.executable)
print(sys.version)
print(os.getcwd())
print(getattr(os, "uname", lambda: None)())
print(sys.path)
2. Python's module search mechanism misunderstanding
According to [Python.Docs]: Modules - The Module Search Path:
When a module named spam is imported, the interpreter first searches for a built-in module with that name. These module names are listed in sys.builtin_module_names. If not found, it then searches for a file named spam.py in a list of directories given by the variable sys.path. sys.path is initialized from these locations:
The directory containing the input script (or the current directory when no file is specified).
PYTHONPATH (a list of directory names, with the same syntax as the shell variable PATH).
The installation-dependent default (by convention including a site-packages directory, handled by the site module).
A module might be located in the current dir, or its path might be added to ${PYTHONPATH}. That could trick users into making them believe that the module is actually installed in the current Python instance ('s site-packages). But, when running the current Python instance from a different dir (or with different ${PYTHONPATH}) the module would be missing, yielding lots of headaches
For a fix, check [SO]: How PyCharm imports differently than system command prompt (Windows) (#CristiFati's answer)
3. A PyCharm bug
Not very likely, but it could happen. An example (not related to this question): [SO]: PyCharm 2019.2 not showing Traceback on Exception (#CristiFati's answer)
To fix, follow one of the options from the above URL
4. A glitch
Not likely, but mentioning anyway. Due to some cause (e.g.: HW / SW failure), the system ended up in an inconsistent state, yielding all kinds of strange behaviors
Possible fixes:
Restart PyCharm
Restart the machine
Recreate the project (remove the .idea dir from the project)
Reset PyCharm settings: from menu select File -> Manage IDE Settings -> Restore Default Settings.... Check [JetBrains]: Configuring PyCharm settings or [JetBrains.IntelliJ-Support]: Changing IDE default directories used for config, plugins, and caches storage for more details
Reinstall PyCharm
Needless to say that the last 2 options should only be attempted as a last resort, and only by experts, as they might mess up other projects and not even fix the problem
Not directly related to the question, but posting:
[SO]: Run / Debug a Django application's UnitTests from the mouse right click context menu in PyCharm Community Edition? (a PyCharm related investigation from a while ago)
[SO]: ImportError: No module named win32com.client (#CristiFati's answer)
If you go to pycharm project interpreter -> clicked on one of the installed packages then hover -> you will see where pycharm is installing the packages. This is where you are supposed to have your package installed.
Now if you did sudo -H pip3 install <package>
pip3 installs it to different directory which is /usr/local/lib/site-packages
since it is different directory from what pycharm knows hence your package is not showing in pycharm.
Solution: just install the package using pycharm by going to File->Settings->Project->Project Interpreter -> click on (+) and search the package you want to install and just click ok.
-> you will be prompted package successfully installed and you will see it pycharm.
If any one faces the same problem that he/she installs the python packages but the PyCharm IDE doesn't shows these packages then following the following steps:
Go to the project in the left side of the PyCharm IDE then
Click on the venv library then
Open the pyvenv.cfg file in any editor then
Change this piece of code (include-system-site-packages = flase) from false to true
Then save it and close it and also close then pycharm then
Open PyCharm again and your problem is solved.
Thanks
This did my head in as well, and turns out, the only thing I needed to do is RESTART Pycharm. Sometimes after you've installed the pip, you can't load it into your project, even if the pip shows as installed in your Settings. Bummer.
For Anaconda:
Start Anaconda Navigator -> Enviroments -> "Your_Enviroment" -> Update Index -> Restart IDE.
Solved it for me.
After pip installing everything I needed. I went to the interpreter and re-pointed it back to where it was at already.
My case: python3.6 in /anaconda3/bin/python using virtualenv...
Additionally, before I hit the plus "+" sign to install a new package. I had to deselect the conda icon to the right of it. Seems like it would be the opposite, but only then did it recognize the packages I had/needed via query.
In my case the packages were installed via setup.py + easy_install, and the they ends up in *.egg directories in site_package dir, which can be recognized by python but not pycharm.
I removed them all then reinstalled with pip install and it works after that, luckily the project I was working on came up with a requirements.txt file, so the command for it was:
pip install -r ./requirement.txt
I just ran into this issue in a brand new install/project, but I'm using the Python plugin for IntelliJ IDEA. It's essentially the same as PyCharm but the project settings are a little different. For me, the project was pointing to the right Python virtual environment but not even built-in modules were being recognized.
It turns out the SDK classpath was empty. I added paths for venv/lib/python3.8 and venv/lib/python3.8/site-packages and the issue was resolved. File->Project Structure and under Platform Settings, click SDKs, select your Python SDK, and make sure the class paths are there.
pip install --user discord
above command solves my problem, just use the "--user" flag
I fixed my particular issue by installing directly to the interpreter. Go to settings and hit the "+" below the in-use interpreter then search for the package and install. I believe I'm having the issue in the first place because I didn't set up with my interpreter correctly with my venv (not exactly sure, but this fixed it).
I was having issues with djangorestframework-simplejwt because it was the first package I hadn't installed to this interpreter from previous projects before starting the current one, but should work for any other package that isn't showing as imported. To reiterate though I think this is a workaround that doesn't solve the setup issue causing this.
If you are having issues with the underlying (i.e. pycharm's languge server) mark everything as root and create a new project. See details: https://stackoverflow.com/a/73418320/1601580 this seems to happy to me only when I install packages as in editable mode with pip (i.e. pip install -e . or conda develop). Details: https://stackoverflow.com/a/73418320/1601580
--WINDOWS--
if using Pycharm GUI package installer works fine for installing packages for your virtual environment but you cannot do the same in the terminal,
this is because you did not setup virtual env in your terminal, instead, your terminal uses Power Shell which doesn't use your virtual env
there should be (venv) before you're command line as shown instead of (PS)
if you have (PS), this means your terminal is using Power Shell instead of cmd
to fix this, click on the down arrow and select the command prompt
select command prompt
now you will get (venv) and just type pip install #package name# and the package will be added to your virtual environment
On windows I had to cd into the venv folder and then cd into the scripts folder, then pip install module started to work
cd venv
cd scripts
pip install module
instead of running pip install in the terminal -> local use terminal -> command prompt
see below image
pycharm_command_prompt_image
In your pycharm terminal run pip/pip3 install package_name

in IntelliJ, showing "No module named xxx", but "xxx" is actually installed in my system

My IntelliJ version is 15.0.3, and have python plugin installed.
And when I open a python file in IntelliJ it's like below
Situation here is like below:
when I import these flagged modules in terminal, everything works fine.
running this python file in IntelliJ, is also fine
It's only the red underlying warning annoying me.
I tried this one, this one and this one, but none works for me.
Could anyone please tell me how to get rid of it? Thanks a lot.
You have to add the site-packages path of your interpreter.
For that you have to:
go to Project Structure
choose Global Libraries
choose your Python interpreter
press + at the upper left corner
choose the site-package path of your interpreter
choose "Classes"
also add your python interpreter root directory in the same way.
I have similar problems: cannot import manually installed module. I try to add classpath in Mac environment parameters and intellij SDKs, but it doesn't work. My final solution is to add the classpath of the module to Run/Debug Configurations:
Open Run/Debug Configurations and select your unittest class:
Run --> Edit Configurations...
Add your module's classpath to Environment variables:

PyCharm 5.0.1 doesn't resolve builtin modules / methods

My PyCharm 5.0.1 installation does not resolve references to any builtin modules or methods:
As you can see, I have installed python over cygwin.
I already tried:
reinstalling / updating the python installation (from 2.7.9 to 2.7.10)
reinstalling pycharm
adding a interpreter path to the python-skeletons in the pycharm installation directory (this was immediately removed by the ide when saving the settings, implying, that it already is embedded)
removing the interpreter (this removes the warnings, but also the code completion, and import asdflkjasd is valid as well)
adding various paths like /lib/python2.7/site-packages/ to the interpreter packages option
None of these improved the situation.
How can I fix this without installation outside of cygwin alltogether?
This is an update with a much better solution than my previous answer (which I completely missed that OP was asking for a solution that didn't require exactly what I suggested).
Like Carl commented above, updating python-skeletons is actually the way to go, however, if you're using Cygwin, the interpreter paths are a little wonky, and PyCharm won't always automatically add the right paths. For me, PyCharm handled it just fine in version 4.5.4, but not 5.0.4.
You'll find the python builtins in your Pycharm config directory, probably at:
C:\Users\[USERNAME]\.PyCharm50\system\python_stubs\-[RANDOM_STRING_OF_NUMBERS]
Just manually add this path (or paths) to your interpreter and it should resolve your problem. You can do the same for your site-packages folder if that's currently polluting your project structure space.
To get to the right menu:
Click File -> Settings
Navigate to Project -> Project Interpreter
Click the gear on the top right and click "More"
Select your interpreter and click the "Show paths" button on the right
Instead of clicking refresh, as many other posts suggest, click the "Add" button on the right and add your paths
There's a handy screenshot uploaded by r---------k on the updating python-skeletons post that if that helps you.
Try installing the Python package for Windows from
http://www.python.org/download/windows and point PyCharm to that
interpreter instead.
Settings -> Project -> Project Interpreter -> Gear -> Add Local
You may also need to install PyCharm's Python packaging tools (you
should see a link on the bottom of the Project Interpreter page if it
isn't installed already).
While this may not be a perfect solution depending on your workflow
because PyCharm will no longer be using Cygwin's python interpreter,
but this at least got rid of those pesky squiggly red underlines for
me.
I use Windows 10 x64, Python 3.5.1 and PyCharm Community Edition 2016.1.4
I have the same problem and sovled it by runnig PyCharm in admin mode (it is required only once).

Adding python modules to pydev in eclipse results in import error?

I have a problem getting PyDev on eclipse to recognize already installed modules. Here is my detailed approach. The machine is a Mac (Snow Leopard).
In terminal the command
python --version
shows Python 2.6.6.
import unidecode
and
from unidecode import unidecode
work both fine!
I installed PyDev in Eclipse and went to configured the python interpreter (Auto Config). I selected all the proposed packages and hit Apply and Ok.
But eclipse keeps complaining
Traceback (most recent call last):
File "/Users/me/Documents/workspace/myproject/python/pythontest.py", line 12, in <module>
from unidecode import unidecode
ImportError: No module named unidecode
The python file looks like this
#!/usr/bin/env python
# encoding: utf-8
import sys
import os
from unidecode import unidecode
def main():
print unidecode(u"Ă…got Aakra")
if __name__ == '__main__':
main()
When I remove the first line in the script
#!/usr/bin/env python
it results into the same error.
Does someone know where the problem lies?
This is the solution to my problem:
Find out the path to the folder ../site-packages/ of your corresponding python version. ( For me it was /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/ for python 2.6 on my Mac with Snoe Leopard.)
Open eclipse preferences and go to PyDev -> Interpreter - Python.
On the left side of the lower box, click on New Folder.
Add the navigate to ../site-packages/ of your corresponding python version.
Hit open.
Hit Apply.
Hit Ok.
And you should be good to go. =)
Thanks #all particionts, who provided hints into the right direction in the comments.
I ran into the same problem just today. I am using pydev and had a working project with a number of sub-packages. Suddenly after having created a new module I was not able to use this module in a different package. The puzzling feature was that I could use another module in the same sub-package...
Finally after
eclipse restart
remove/add python interpreter and all site-packages
annoyed head-scratching
I deleted all compiled classes with the following script:
import os
def clean_folder(folder):
for file in os.listdir(folder):
path = os.path.join(folder,file)
if os.path.isdir(path):
clean_folder(path)
if '.pyc' == file[-4:]:
print 'deleting: ' + str(path)
os.remove(path)
if __name__ == '__main__':
folder = 'YOUR_PROJECT_SRC_PATH'
clean_folder(folder)
and finally I can do 'actual' work :)
Hope it helps somebody...
You can simply add the module to the pydev path. Go to project properties (from the context menu) -> PyDev -> PYTHONPATH -> External Libraries. Depending on whether the module is in a source folder or a zip/egg file, select either Add source folder or Add zip/jar/egg. Navigate to the site-packages directory and point to the relevant file or folder (mine is: /usr/local/lib/pythonx.x/site-packages)
Try preferences > pydev > interpreter - python and removing and re-adding the python interpreter (make sure you know the path to it before you delete it), when you re-add it tick all the boxes.
When Eclipse gets 'lost' with respect to what packages exists on your system or in your project, from the context menu of your project, choose 'Properties' menu item, then the 'PyDev - PYTHONPATH' item in the treeview on the left of the dialog, then the 'Force restore internal info' button. Seemingly, PyDev keeps a computed cache of the info and when for any reason the cache becomes incoherent, you can force PyDev to recompute.
In my case I was not getting this error before compiling, but when I compile I got the error ImportError: No module named myant.core. I tried to add the files from PyDev-PYTHONPATH, but again I got the same error. Then I realized that I actually do not have to add the path exactly to the folder where my .py files are located. Infact I have to add the folder where myant.core is located. After doing this I did a restart when I recompiled my project again, the problem was fixed. I would share that I have:
Python 2.7 Eclipse kepler 4.3, PyDev 3.9.2 and on my ubuntu 14.04
.py files location:/${PROJECT_DIR_NAME}/src/myant/core, therefore I added /${PROJECT_DIR_NAME}/src
#Aufwind your answer above helped but didn't solve for me.
Find the path to the folder ../site-packages/ ....
Open eclipse preferences and go to PyDev -> Interpreter - Python.
On the left side of the lower box, click on New Folder.
---> here I departed from your instructions. I added the egg for the module that wasn't being recognized. Adding the site-packages folder didn't fix it.
Hit open.
Hit Apply.
Hit Ok.
And then I was good to go. =)
Open eclipse window -> preferences and go to PyDev -> Interpreter.
click on 'Check if interpreters are synchronized with environment'
This did it for me. No Eclipse restart was required.
I fixed this problem by going to the project properties -> PyDev Django
and setting the Django settings module.
For Oxygen 2 (I think it worked on earlier versions, too)...
Right click on project folder and select "Properties"
Select "PyDev - Interpreter/Grammar"
Click on "Click here to configure an interpreter not listed"
Select any existing interpreter from the top list of configured interpreters
A "Selection Needed" dialog should appear where you must select one or more interpreters to restore. Check all that apply
Click "Ok" and PyDev will rescan, and I assume, rebuild some internal view of your site-packages
Click "Apply and Close" to close all dialogs
To make the import error markup disappear in my code editor, I need to type a space after the offending import then save the change. The import error then disappears because PyDev can now find the offending import module.
Suppose your eternal module is in /.
Launch Eclipse and go to the project option. Select "PyDev-PYTHONPATH"
and on the right you will see a tabbed window. Select External Libraries there.
Click on Add Source Folder and select your library from the above path.

Pydev, eclipse and pythonpath problem

I've installed pydev to my eclipse 3.5.2. Everything was working smoothly, create projects, execute, test, autocomplete.
But then I realized that importing modules from /usr/lib/pymodules/python2.6, such as django, causes error "Unresolved import: xxxx". Of course, PYTHONPATH SYSTEM includes the directories I want. What's more, inside package explorer i can c the modules under "System Libs".
I just can't import them :S. Is this a bug? Or I just missing something.
Thanks.
In eclipse you can add django folder in you python path.
Window->Preferences-> PyDev-> Interpreters->Python Interpreter -> Lirararies -> New Folder
And browse till the parent folder of modules you are searching.
If you're using virtualenv you should setup an interpreter using the python build inside.
ie., default python interpreter for th project will be /usr/bin/python
but change it to something like "{project name} python" and point it to your virtual env path. In my case it's ~/.virtualenvs/acme/bin/python
It seems like some sort of cache issue in PyDev... in which case you could try to remove the interpreter, add it again and restart Eclipse.

Categories

Resources