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 6937491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:22:10+00:00 2026-05-27T12:22:10+00:00

I have recently switched from python 2.7 to python 3.2 considering following folder structure:

  • 0

I have recently switched from python 2.7 to python 3.2

considering following folder structure:

~/my_program
~/my_program/modules

where *my_program* is the root of the application, containing main script called main.py

  *my_program/modules* is used to store all additional classes and subscripts

in python2.x I was able to import any file “module” the same way I do import standard modules

from modules import abc.py 

however, while I try to launch the same program in python3.2 I get the error message saying:

File "/my_program/modules/__init__.py" line 1
import abc, def

ImportError: No module named abc

Please advise

  • 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-05-27T12:22:11+00:00Added an answer on May 27, 2026 at 12:22 pm

    It’s a good example you are using, because “abc” is in fact a module in the standard library. So in fact, if you in Python 3 do import abc that will work just fine, but you will get the standard library module.

    In Python 2, if you had a local module called abc.py, that import abc would import the local module instead. That means you couldn’t import the module from the standard library.

    In Python 3, this has been changed, and you now need to use the fully qualified name, in your case probably from modules import abc.

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

Sidebar

Related Questions

We have a C# application written in C# and recently switched over from MbUnit
We just recently switched from Visual Studio 2008 to Visual Studio 2010. I have
We have a WCF service that we recently switched from self-hosting to IIS-hosted. It
I recently switched from Eclipse to NetBeans (although I don't have any current Eclipse
Recently, I switched my development environment from Windows to Linux. So far, I have
I have recently switched back to IntelliJ from Eclipse and one thing I am
I have recently switched my application to SDK 4.0. Now i am compiling my
I have recently switched from using Eclipse to IntelliJ, and am preferring the experience.
I recently switched from intermediate mode and have a new rendering process. There must
I have recently switched from C# to JAVA, although I have a few questions.

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.