Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9041765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T10:19:02+00:00 2026-06-16T10:19:02+00:00

I have Flask, Babel and Flask-Babel installed in the global packages. When running python

  • 0

I have Flask, Babel and Flask-Babel installed in the global packages.
When running python and I type this, no error

>>> from flaskext.babel import Babel
>>>

With a virtual environment, starting python and typing the same command I see

>>> from flaskext.babel import Babel
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named flaskext.babel
>>>

The problem is that I’m using Ninja-IDE and I’m apparently forced to use a virtualenv. I don’t mind as long as it doesn’t break Flask packing system.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T10:19:04+00:00Added an answer on June 16, 2026 at 10:19 am

    Yeah! I solved the problem!

    Creating an empty _init_py in the global Lib/site-packages/flaskext next to the babel.py file solves the problem.

    Importing Babel from the local environment now works as expected and as it worked in the global environment.

    We can use the two forms from flaskext.babel import Babel and from babel.ext.babel import Babel. However the forms *from flask_babel import Babel* or *import flask_babel* don’t work.

    Note that I’m running on Windows 7 64bit with Python 2.7 in C:\Python27. The absence of init.py file may not be a problem on unix computers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this simple Flask app: from flask import Flask import prolog_handler as p
I'm having some trouble with Mongodb and Python (Flask). I have this api.py file,
I have a small application written in Python using Flask. Right now I'm running
Initial Condition: I have a Python Flask server running on a remote machine that
I am running the following code from flask import Flask app = Flask(__name__) @app.route(/)
I have an error when trying to use the url_for method in Flask. I'm
I am writing my website's backend using Flask and Python 2.7, and have run
I have a Python Flask app I'm writing, and I'm about to start on
I have this to SQLAlchemy(using the Flask SqlAlchemy) objects defined: class User(db.Model): id =
I have a simple web service in Python / Flask against MongoDB: https://github.com/rjurney/Collecting-Data/blob/master/src/python/web/index.py It

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.