Forums

installed module not found

I installed the module tinydb, but am receiving the error "ModuleNotFoundError: No module named 'tinydb'". I installed it using "pip3.6 install --user tinydb" and double-checked and it says requirement satisfied. I can successfully use the module in the bash console, but the error persists when I go to my pythonanywhere site. What could be the problem?

I got it to work by installing it in a virtual environment instead, still not sure what the original problem was

In the requirement section of your buildozer.spec you should add the modules your program needs: requirements = kivy,tinydb

after adding this may be solve your problem

@cherzog92 was the ModuleNotFoundError appearing in your website's error log? If so, did you reload your website (using the button on the "Web" page) after you used pip3.6 to install the module? Python caches the non-existence of modules, so you need to reload the site after installing things.

having the same problem. I reloaded the website via the button and all. I am trying to install flask_mail. it installed correctly works on terminal, but I am still getting the import error.

any other ideas?

thank you

Are you running your code in the terminal with the same python version/environment as in the web app?

I am also getting the same error with markdownx i installed correctly but it's not loading so I checked bu running particular file and console throws an error of module not found.

Are you running your code in the terminal with the same python version/environment as in the web app?

I am having the same problem. I have installed the module but am not able to get it when I run the program. I don't know almost anything about python anywhere. Why am I facing this error

Make sure that you have installed the module into the same version of Python that you are running the code in. pip installs into Python 2.7, pip3.6 installs into Python 3.6 etc. If you're using a virtualenv, make sure that you are installing into the virtualenv that you're running your code in.

Anyone have any solution for same .

I am also getting same error

Make sure that you have installed the module into the same version of Python that you are running the code in. pip installs into Python 2.7, pip3.6 installs into Python 3.6 etc. If you're using a virtualenv, make sure that you are installing into the virtualenv that you're running your code in.

Same problem

Make sure that you have installed the module into the same version of Python that you are running the code in. pip installs into Python 2.7, pip3.6 installs into Python 3.6 etc. If you're using a virtualenv, make sure that you are installing into the virtualenv that you're running your code in.

Hi i am currently facing this error, my python version is the same as in my django project 3.9 and the pip version says pip 21.1.2, from the message above should my pip also be pip 3.9?

3.9 is a version of python that pip is installing packages for. 21.1.2 is the version of pip itself. Make sure that you install packages for the correct python version/venv

Thank you for replying, this is the error i am getting i have tried to make sure my versions are correct

2021-08-04 12:53:54,120: Error running WSGI application
2021-08-04 12:53:54,128: ModuleNotFoundError: No module named 'django_sass'
2021-08-04 12:53:54,128:   File "/var/www/fulodev_pythonanywhere_com_wsgi.py", line 38, in <module>
2021-08-04 12:53:54,128:     application = get_wsgi_application()
2021-08-04 12:53:54,128: 
2021-08-04 12:53:54,128:   File "/home/fulodev/.virtualenvs/myenv/lib/python3.9/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
2021-08-04 12:53:54,128:     django.setup(set_prefix=False)
2021-08-04 12:53:54,129: 
2021-08-04 12:53:54,129:   File "/home/fulodev/.virtualenvs/myenv/lib/python3.9/site-packages/django/__init__.py", line 24, in setup
2021-08-04 12:53:54,129:     apps.populate(settings.INSTALLED_APPS)
2021-08-04 12:53:54,129: 
2021-08-04 12:53:54,129:   File "/home/fulodev/.virtualenvs/myenv/lib/python3.9/site-packages/django/apps/registry.py", line 91, in populate
2021-08-04 12:53:54,129:     app_config = AppConfig.create(entry)
2021-08-04 12:53:54,130: 
2021-08-04 12:53:54,130:   File "/home/fulodev/.virtualenvs/myenv/lib/python3.9/site-packages/django/apps/config.py", line 224, in create
2021-08-04 12:53:54,130:     import_module(entry)

and this is my wsgi file

import os

from django.core.wsgi import get_wsgi_application

import sys
from dotenv import load_dotenv

project = os.path.expanduser('/home/fulodev/portfolio_project/project')
load_dotenv(os.path.join(project, '.env'))


path = '/home/fulodev/portfolio_project/project'
if path not in sys.path:
    sys.path.insert(0, path)


os.environ['DJANGO_SETTINGS_MODULE'] = 'project.settings'

application = get_wsgi_application()

i have also checked and the django_sass module is indeed installed already Thank you again for your time i really appreciate it

[edit by admin: formatting]

Are you sure you're looking at the right error in the error log? The most recent one will be at the bottom of the file, and each line has a timestamp at the start. For example, in the log file excerpt you posted, the error happened at 12:53pm on 4 August, almost 24 hours before your post -- which makes me think you're looking at old errors.

I fucking hate pythonanywhere

why is the package being istalled in .local / lib and not in my apps virt env?

If you want to install a package into a virtual environment, you need to activate it first (or use pip from that venv), otherwise it will be installed for your account (as if you run the pip command with the --user option).