Django is not available on the PYTHONPATH


#1

I am running the basic template of python (not using Django), and when I try to import any module I get the error message Django is not available on the PYTHONPATH. Yesterday it was working fine, I dont understand the error. I am not using Django, I am just using the IDE to learn some python.

Thanks


#2

bump

I’m experiencing the same problem, in a Node workspace when I go into the python file, it has an error on line 1 that says the same thing, and when I run the app, it throws an error about a file not existing even though it exists.


#3

Same here, all my Python files are showing the same message.


#4

same here but only when
import os


#5

I am also just trying to learn python, but seeing this error.


#6

Me too. Only first line shows this error


#7

For me this error is showing too on line 1


#8

Hi there!
I had this error too, although it seemed not to be affecting my project, since it was working smoothly.

I installed Django in my virtual environment, so it seemed the editor error check was using the project pythonpath instead of my actual path (in my virtual environment). It probably doesn’t make too much sense using virtualenvs in cloud9 where I can just get a new fresh environment for every project, but I’m not discussing this here.

If this is your case, you can go to your project preferences (the wheel in the upper right corner) and add your path to the pythonpath, something like this:

(…):/home/ubuntu/workspace/myfolder/myvenv/lib/python3.5/site-packages

you’ll see that annoying error disappearing.

Also, in preferences, see that you can change your project python version, but if you are using a virtual env, I guess it doesn’t matter.

Not sure if this is the proper workaround to solve it, just my contribution here.

Malon


#9

I had the same problem on the python template and had to delete the whole workspace. Next I tried on blank workspace, and the same problem continues. I cannot run a damn hello world program on any template, it is completely broken.


#10

I had the same problem and solved it. All you need to do is to install django using the the following command “sudo pip install django”. It worked for me and I don’t see the error anymore.


False positive Python errors
#11

thanks a lot, this indeed fixed the issue!


#12

That fixes the problem if you’re actually using Django, but for those of us not using Django, this error makes zero sense.


#13

It makes no sense to me either since I am not using Django in my workspace, but I don’t mind wasting few bytes to get rid of such annoying error.