I get the error ModuleNotFoundError: No module named 'bootstrapform' but I have already installed django-bootstrap-form.
I have read other questions here where the fix has been to install that module, but in my case this is not working. I have the same site running on my laptop and can see no difference so it is confusing.
So here is the module list:
Here is the error:
...and here is the INSTALLED_APPS section of settings.py:
I can't see the problem...
It appears that py -3 is not using the django_env virtualenv that pip3 is using. Once you have activated your virtualenv, you can simply use python.
python manage.py makemigrations
Related
When I tried to execute python manage.py runserver, it failed due to the SyntaxError. Then I tried it with python 3, it still didn't help and said "No module named 'django'".
However, when I searched the packages in my virtualenv, it seemed that django is inside this virtualenv.
It seems like it's using the local packages but not the packages inside the virtualenv.
Can someone help me resolve this problem? Thx
When I run my Django project on CircleCI I get the following error: "ModuleNotFoundError: No module named 'admin_view_permission'"
The project runs with no problems locally on my computer. I added the module admin_view_premissions, to settings, from this page: https://github.com/ctxis/django-admin-view-permission
Then I ran "pip install django-admin-view-permission", and it worked fine. The migration also did not have any problems.
Does anyone know why CircleCI is not able to find the module?
Thank you for your time!
I had to write the package in the Pip-file by using: pipenv install django-admin-view-permission
On PythonAnywhere's website they say they have requests as part of their library and it gave no error in the editor on the site but during execution it gave this :
Python Version: 3.4
Django Version: 1.7
Exception Type: ImportError
Exception Value:
No module named 'requests'
However it clearly states that they have it, what is the problem ?
https://www.pythonanywhere.com/batteries_included/#a_python34
The solution is to enter the virtual environment.
Using lsvirtualenv to find the virtualenv you're using then simply use the workon env-name to get into that virtualenv.
Once there pip3 install requests and you're good to go!
The problem is essentially that when using the virtualenv you have to downaload all the packages you want manually. The 'batteries included' list is for non virtualenv usage only so it can be a bit confusing.
I didn't worked on the django project for somedays and now I return and I can't work on it. When I debug or run in eclipse aptana I get the "Error: No module named staticfiles" error.
I have even updated aptana to today's updates and no luck.
I have uninstalled the django, delete all files and reinstall.
If I import django with python in cmd (on windows) it is in the place I expect to be
But if I delete the "'django.contrib.staticfiles'," string in the "INSTALLED_APPS" from settings.py everything works fine but I have no access to the static files, as expected..
In those days I have installed Google app engine + python 2.5; can this be the problem and how to solve?
thank you very much*
Here are the steps I'd take to find out the problem:
verify that it's working correctly in the command-line (cmd.exe in windows) - just to remove the issues associated with Aptana. You need to do something like: C:\Path\to\Python2.6\python.exe manage.py runserver (NB: choose any management command that will check your settings.py). If this gives the same error, then you haven't got Django 1.3.1 installed in Python2.6 (you could install it, or you could set up a fresh virtualenv, see below)
once you've got it working in the command line, you just have to make sure that aptana is using the correct interpreter path. You need to check that you've defined it correctly (in your global preferences (the workspace settings) -- pydev python interpreter) and then are using it in the specific project -- (check the project settings that it is using the python interpreter you just defined )
NB: Django 1.3.1 can use python2.5, but not next version of django
Here is how I would avoid this in future:
use virtualenv[1] to avoid being dependent on the arbitrary nature of your installation history (once you've installed virtualenv in ANY version of python you can then specify which python when you set up the virtualenv: virtualenv -p C:\Path\to\Python2.6\python.exe ).
use virtualenv --no-site-packages to ensure you have no dependencies locally
use pip[2] to install all your python packages (problems may occur with packages with binary content - use easy_install for those)
use pip freeze > requirements.txt to record your dependencies (and add this file into your source code control)
[1] http://pypi.python.org/pypi/virtualenv
[2] http://pypi.python.org/pypi/pip
NB pip and easy_install are automatically installed into your new virtualenv
use {% load static %} instead of {% load staticfiles %}
in the new version of Django, the syntax of loading static files changed
This is the first time I've tried Python. I followed this guide, and want make this app running in Ubtuntu 10 server.
I used easy_install virtualenv and followed the rest of the setup steps. But, I got errors in step 8:
(mirosubs-env)root#makserver:/usr/local/src/mirosubs# python manage.py syncdb
Error: No module named sorl.thumbnail
(mirosubs-env)root#makserver:/usr/local/src/mirosubs# ./dev-runserver.sh
Error: No module named south
Any suggestions?
Seems like either you forgot to install some additional Python modules or your documentation doesn't mention them. You need to do:
sudo easy_install South
sudo easy_install sorl-thumbnail
Of course, you may encounter further problems, but that should solve your immediate issue.