1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Python] ModuleNotFoundError: No module named 'flask_cors' on python anywhere

Discussão em 'Python' iniciado por Stack, Setembro 13, 2024.

  1. Stack

    Stack Membro Participativo

    To state from the get go this is no criticism of pythonanywhere, but I want to run a script that used to work using the line:

    from flask_cors import CORS


    But I get the following error mesage:

    ModuleNotFoundError: No module named 'flask_cors'


    Then tried to install in my version of python:

    pip3.9 install Flask-Cors


    The result was:


    Defaulting to user installation because normal site-packages is not writeable Looking in links: /usr/share/pip-wheels Requirement already satisfied: Flask-Cors in ./.local/lib/python3.9/site-packages (3.0.10) Requirement already satisfied: Six in /usr/local/lib/python3.9/site-packages (from Flask-Cors) (1.16.0) Requirement already satisfied: Flask>=0.9 in /usr/local/lib/python3.9/site-packages (from Flask-Cors) (2.0.0) Requirement already satisfied: Werkzeug>=2.0 in /usr/local/lib/python3.9/site-packages (from Flask>=0.9->Flask-Cors) (2.0.1) Requirement already satisfied: itsdangerous>=2.0 in /usr/local/lib/python3.9/site-packages (from Flask>=0.9->Flask-Cors) (2.0.1 ) Requirement already satisfied: click>=7.1.2 in /usr/local/lib/python3.9/site-packages (from Flask>=0.9->Flask-Cors) (7.1.2) Requirement already satisfied: Jinja2>=3.0 in /usr/local/lib/python3.9/site-packages (from Flask>=0.9->Flask-Cors) (3.0.1) Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.9/site-packages (from Jinja2>=3.0->Flask>=0.9->Flask-C ors) (2.0.1) 15:33 ~$ pip show Flask-Cors Name: Flask-Cors Version: 3.0.10 Summary: A Flask extension adding a decorator for CORS support Home-page: https://github.com/corydolphin/flask-cors Author: Cory Dolphin Author-email: corydolphin@gmail.com License: MIT Location: /home/elksie5000/.local/lib/python3.9/site-packages Requires: Six, Flask

    What gives and how do I fix it?

    Continue reading...

Compartilhe esta Página