相关文章推荐
气势凌人的洋葱  ·  Simple SimpleTimer ...·  4 月前    · 
阳光的蟠桃  ·  @Scheduled ...·  1 年前    · 
强悍的苹果  ·  Kindle ...·  1 年前    · 

Hi, I'm trying to deploy my app. So I have an error "ModuleNotFoundError: No module named 'seaborn' " Well, no problem I think and install seaborn with a command pip3.6 install --user seaborn. And it's installed, I can import it. But the app doesn't work even after many reloads. It still gives me an error that no module named seaborn. How can I solve it?

Sure. Also it works perfectly on my local server. 2017-11-22 22:08:48,096: Error running WSGI application 2017-11-22 22:08:48,099: ModuleNotFoundError: No module named 'seaborn' 2017-11-22 22:08:48,100: File "./app.py", line 7, in <module> 2017-11-22 22:08:48,100: import seaborn as sns

Okay, I have no idea why it doesn't work

2017-11-22 22:08:48,096: Error running WSGI application
2017-11-22 22:08:48,099: ModuleNotFoundError: No module named 'seaborn'
2017-11-22 22:08:48,099:   File "/var/www/hexi_pythonanywhere_com_wsgi.py", line 16, in <module>
2017-11-22 22:08:48,099:     from app import app as application
2017-11-22 22:08:48,100: 
2017-11-22 22:08:48,100:   File "./app.py", line 7, in <module>
2017-11-22 22:08:48,100:     import seaborn as sns
2017-11-22 22:08:48,100: ***************************************************
2017-11-22 22:08:48,100: If you're seeing an import error and don't know why,
2017-11-22 22:08:48,100: we have a dedicated help page to help you debug: 
2017-11-22 22:08:48,100: https://help.pythonanywhere.com/pages/DebuggingImportError/
2017-11-22 22:08:48,101: ***************************************************
2017-11-22 22:08:50,504: Error running WSGI application
2017-11-22 22:08:50,505: ModuleNotFoundError: No module named 'seaborn'
2017-11-22 22:08:50,505:   File "/var/www/hexi_pythonanywhere_com_wsgi.py", line 16, in <module>
2017-11-22 22:08:50,505:     from app import app as application
2017-11-22 22:08:50,505: 
2017-11-22 22:08:50,505:   File "./app.py", line 7, in <module>
              

You are right, the error is a bit different now:

2017-11-27 13:34:10,925: Error running WSGI application
2017-11-27 13:34:10,930: ModuleNotFoundError: No module named 'app'
2017-11-27 13:34:10,930:   File "/var/www/hexi_pythonanywhere_com_wsgi.py", line 16, in <module>
2017-11-27 13:34:10,930:     from app import app as application
2017-11-27 13:34:10,930: ***************************************************
2017-11-27 13:34:10,931: If you're seeing an import error and don't know why,
2017-11-27 13:34:10,931: we have a dedicated help page to help you debug: 
2017-11-27 13:34:10,931: https://help.pythonanywhere.com/pages/DebuggingImportError/
2017-11-27 13:34:10,931: ***************************************************
2017-11-27 13:34:59,391: Error running WSGI application
2017-11-27 13:34:59,391: ModuleNotFoundError: No module named 'app'
2017-11-27 13:34:59,392:   File "/var/www/hexi_pythonanywhere_com_wsgi.py", line 16, in <module>
2017-11-27 13:34:59,392:     from app import app as application
2017-11-27 13:34:59,392: ***************************************************
2017-11-27 13:34:59,392: If you're seeing an import error and don't know why,
2017-11-27 13:34:59,392: we have a dedicated help page to help you debug: 
2017-11-27 13:34:




    
59,392: https://help.pythonanywhere.com/pages/DebuggingImportError/
2017-11-27 13:34:59,392: ***************************************************
2017-11-27 13:35:00,317: Error running WSGI application
2017-11-27 13:35:00,317: ModuleNotFoundError: No module named 'app'
2017-11-27 13:35:00,317:   File "/var/www/hexi_pythonanywhere_com_wsgi.py", line 16, in <module>
2017-11-27 13:35:00,317:     from app import app as application
2017-11-27 13:35:00,318: ***************************************************
2017-11-27 13:35:00,318: If you're seeing an import error and don't know why,
2017-11-27 13:35:00,318: we have a dedicated help page to help you debug: 
2017-11-27 13:35:00,318: https://help.pythonanywhere.com/pages/DebuggingImportError/
2017-11-27 13:35:00,318: ***************************************************
              

Got the same problem importing pdfkit.

YES I have checked the debugging tips. YES I have checked Python versions..

Still...

2019-02-13 10:58:31,090: Error running WSGI application
2019-02-13 10:58:31,096: ModuleNotFoundError: No module named 'pdfkit'
2019-02-13 10:58:31,096:   File "/var/www/kkff_pythonanywhere_com_wsgi.py", line 16, in <module>
2019-02-13 10:58:31,096:     from flask_app import app as application  # noqa
2019-02-13 10:58:31,097: 
2019-02-13 10:58:31,097:   File "/home/kkff/mysite/flask_app.py", line 9, in <module>
2019-02-13 10:58:31,097:     from helpers import makeTicket
2019-02-13 10:58:31,097: 
2019-02-13 10:58:31,097:   File "/home/kkff/mysite/helpers.py", line 5, in <module>
2019-02-13 10:58:31,097:     import pdfkit

[edit by admin: formatting]

2019-02-13 10:58:31,090: Error running WSGI application 2019-02-13 10:58:31,096: ModuleNotFoundError: No module named 'pdfkit' 2019-02-13 10:58:31,096: File "/var/www/kkff_pythonanywhere_com_wsgi.py", line 16, in <module> 2019-02-13 10:58:31,096: from flask_app import app as application # noqa 2019-02-13 10:58:31,097: 2019-02-13 10:58:31,097: File "/home/kkff/mysite/flask_app.py", line 9, in <module> 2019-02-13 10:58:31,097: from helpers import makeTicket 2019-02-13 10:58:31,097: 2019-02-13 10:58:31,097: File "/home/kkff/mysite/helpers.py", line 5, in <module> 2019-02-13 10:58:31,097: import pdfkit

pdfkit isn't installed by default (you can see a list of pre-installed packages here) but you can install it for your own account using the techniques on this help page.

  • If you use the virtualenv technique, don't forget to enter the virtualenv name on the "Web" page
  • If you use the pipX.Y install --user technique, then don't forget to use the specific "X.Y" that matches the Python version for your website (which looks like it's currently set up to use Python 3.7).
  • If you're getting an import error or a module not found error for something that you believe is installed, then you've probably installed it into a version of Python or virtualenv that your code is not running in. If it's part of your code that is not being found, then your Python path is not set up so that it sees the module you're trying to import. See https://help.pythonanywhere.com/pages/DebuggingImportError/

    I am also getting ModelNotFoundError. Home page of my application is running properly. But now I want to run one "models.py" file in python anywhere console. This "models.py" file contains code for creating tables in database. When I run this "models.py" file using command "python models.py" I am getting ModelNotFoundError.

    Can you please guide ?

    (directory) ---> (files)

    configurations --> config.py

    controller --> task_1_controller.py task_2_controller.py main_controller.py

    models --> models.py

    templates --> home.html task_1.html task_2.html

    In config.py file I have created app instance and db instance. In models.py file I am importing db instance from configurations/config.py and creating models. I have written "db.create_all()" in "if name == 'main':" block.

    That means when I will run models.py file directly, models has to be created.

    but in Python Anywhere console, I am getting Import error for import line of db instance from config.py file

    and one more thing, I m deploying Flask app, not Django.

    also can you please advise a effective way to add tables to databases ?

    Hi Folks... Mahesh Here, I'm also confronting the identical error ModuleNotFoundError for django crispy_forms even though i have installed that using pip command in my machine. It works fine and perfectly while running it locally with the default host id 127.0.0.1:8000 but when i start deploying it, i will be dragged to that itchy error. Pls, help me out.

    1Hii guys i can't solve this error please anyone can help me to solve this Problem..

    2021-03-23 19:08:04,353: Error running WSGI application
    2021-03-23 19:08:04,355: ModuleNotFoundError: No module named 'HRMSPROJECT-master.settings'
    2021-03-23 19:08:04,355:   File "/var/www/dixit11_pythonanywhere_com_wsgi.py", line 19, in <module>
    2021-03-23 19:08:04,355:     application = get_wsgi_application()
    2021-03-23 19:08:04,356: 
    2021-03-23 19:08:04,356:   File "/home/dixit11/.virtualenvs/rock/lib/python3.8/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
    2021-03-23 19:08:04,356:     django.setup(set_prefix=False)
    2021-03-23 19:08:04,356: 
    2021-03-23 19:08:04,356:   File "/home/dixit11/.virtualenvs/rock/lib/python3.8/site-packages/django/__init__.py", line 19, in setup
    2021-03-23 19:08:04,356:     configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
    2021-03-23 19:08:04,356: 
    2021-03-23 19:08:04,356:   File "/home/dixit11/.virtualenvs/rock/lib/python3.8/site-packages/django/conf/__init__.py", line 79, in __getattr__
    2021-03-23 19:08:04,356:     self._setup(name)
    2021-03-23 19:08:04,356: 
    2021-03-23 19:08:04,356:   File "/home/dixit11/.virtualenvs/rock/lib/python3.8/site-packages/django/conf/__init__.py", line 66, in _setup
    2021-03-23 19:08:04,357:     self._wrapped = Settings(settings_module)
    2021-03-23 19:08:04,357: 
    2021-03-23 19:08:04,357:   File "/home/dixit11/.virtualenvs/rock/lib/python3.8/site-packages/django/conf/__init__.py", line 157, in __init__
    2021-03-23 19:08:04,357:     mod = importlib.import_module(self.SETTINGS_MODULE)
    

    [edit by admin: formatting]

    That looks like an error in your WSGI file. The DJANGO_SETTINGS_MODULE defined there should be the name of the module that has your settings; HRMSPROJECT-master.settings is unlikely to be correct because module names cannot have dashes in them.

    What do you have in your WSGI file? And where is your Django settings file located?

    hi Guys,

    I am using xlsxwriter module for my python script , and i too am facing the same issue as shown below: import xlsxwriter ImportError: No module named xlsxwriter

    I tried running the pip --user command, but no luck.

    Can someone please help me with this ?

    Thanks in advance !

    If you're getting an import error or a module not found error for something that you believe is installed, then you've probably installed it into a version of Python or virtualenv that your code is not running in. If it's part of your code that is not being found, then your Python path is not set up so that it sees the module you're trying to import. See https://help.pythonanywhere.com/pages/DebuggingImportError/

    I am getting a module import error I am trying to run a wagtailsite and it has an installed app home. The app is built using python 3.8

    f you're seeing an import error and don't know why, 2021-05-12 19:22:38,020: we have a dedicated help page to help you debug: 2021-05-12 19:22:38,020: https://help.pythonanywhere.com/pages/DebuggingImportError/ 2021-05-12 19:22:38,020: ********* 2021-05-12 19:22:44,530:

    Error running WSGI application

    2021-05-12 19:22:44,530: ModuleNotFoundError: No module named 'home' 2021-05-12 19:22:44,531: File "/var/www/ashwgtpyany_pythonanywhere_com_wsgi.py", line 92, in <module> 2021-05-12 19:22:44,531: application = get_wsgi_application() 2021-05-12 19:22:44,531: 2021-05-12 19:22:44,531: File "/home/ashwgtpyany/.virtualenvs/wagtail-portfolio-try-py38/lib/python3.8/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application 2021-05-12 19:22:44,531: django.setup(set_prefix=False) 2021-05-12 19:22:44,531: 2021-05-12 19:22:44,531: File "/home/ashwgtpyany/.virtualenvs/wagtail-portfolio-try-py38/lib/python3.8/site-packages/django/init.py", line 24, in setup 2021-05-12 19:22:44,532: apps.populate(settings.INSTALLED_APPS) 2021-05-12 19:22:44,532: 2021-05-12 19:22:44,532: File "/home/ashwgtpyany/.virtualenvs/wagtail-portfolio-try-py38/lib/python3.8/site-packages/django/apps/registry.py", line 91, in populate 2021-05-12 19:22:44,532: app_config = AppConfig.create(entry) 2021-05-12 19:22:44,532: 2021-05-12 19:22:44,532: File "/home/ashwgtpyany/.virtualenvs/wagtail-portfolio-try-py38/lib/python3.8/site-packages/django/apps/config.py", line 90, in create 2021-05-12 19:22:44,532: module = import_module

    Error running WSGI application ModuleNotFoundError: No module named 'accsesory' File "/var/www/mostafaarafa_pythonanywhere_com_wsgi.py", line 31, in <module> application = get_wsgi_application()

    Sorry, we have had to rate-limit your feedback sending.
    Please try again in a few moments... Thanks for the feedback! Our tireless devs will get back to you soon.