Saturday, April 29, 2023

Re: Import [python django module] could not be resolved from source Pylance (reportMissingModuleSource) -- even though Django is installed in my venv

Thanks. I already have a venv, to answer the first post, and the second, yes, it says 3.11.2. I think VSCode just has a bug. It doesn't bother me and my app works in all other respects. Thank you for the input.

Michael

On Friday, April 28, 2023 at 7:11:57 AM UTC-7 ALBERT ASHABA AHEEBWA wrote:
This is a wild suggestion, but as someone here mentioned, your vscode might be pointing to the wrong interpreter.

Check at the bottom bar of your vscode with a .py file open. Next to {}python you should see what environment you are using. 

eg. 3.11.3 64-bit or 3.11.3('.venv':venv)

The latter is what you are looking for. If it's not, click on whatever is there and on popup, select the appropriate. 



Best Regards,

Albert Ashaba Aheebwa
+256 781 435857

On Thu, 27 Apr 2023, 23:48 Michael Starr, <michaelst...@gmail.com> wrote:
I did pip install django on my venv, which is activated, and it reported already installed. But the following modules are reporting the error in the subject line:
django.db
models
django.utils.crypto
django.urls
django.contrib
admin
django.shortcuts
django.views.generic

I don't know what's wrong. My server runs in development mode (not in production yet), but there havev been some bugs that are hard to imagine are caused by this, but still (images not loading, CSS not loading).

Thanks.

Michael

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f7977c43-90ef-4423-bb36-07c550bfda52n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/8bfb55ff-a550-4fe1-9ec5-73074f3de264n%40googlegroups.com.

No comments:

Post a Comment