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

  • Home
  • SEARCH
  • 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 8002681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:26:08+00:00 2026-06-04T16:26:08+00:00

I don’t know if pycharm is anything to do with the problem, or if

  • 0

I don’t know if pycharm is anything to do with the problem, or if it’s me being noob.

Here is a screenshot of my folder layout and three code files:

screenshot

I’m using Pycharm on windows and “my_working_directory” is my working directory. You can see in the screenshot that in mod1.py “from package2.mod2” is underlined meaning “unresolved reference”.

When I attempt to run mod1.py I get:

C:\Python27\python.exe C:/Users/Robert/PycharmProjects/play/my_working_directory/package1/mod1.py
Traceback (most recent call last):
  File "C:/Users/Robert/PycharmProjects/play/my_working_directory/package1/mod1.py", line 1, in <module>
    from package2.mod2 import SomeClass
ImportError: No module named package2.mod2

When I run main.py I get:

C:\Python27\python.exe C:/Users/Robert/PycharmProjects/play/my_working_directory/main.py
hi

I don’t understand why one works and not the other.

The main problem is that pycharm gives me no auto complete and from mod1 it can’t detect package2. This is a huge problem because package1 is my view package, package2 is my models or utils or lib package (in a big model view controller). (example https://github.com/coto/gae-boilerplate/blob/master/web/handlers.py pycharm isn’t detecting any of the from lib.? import ? statements. (giving unresolved reference).

Anyone know what’s going on? Is this the best way of importing packages? Should I expect to be able to have autocomplete?

Should “my_working_directory” be made into a package by making another init.py file?

  • 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-04T16:26:09+00:00Added an answer on June 4, 2026 at 4:26 pm

    It could be that C:/Users/Robert/PycharmProjects/play is not on your %PYTHON_PATH%

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

Sidebar

Related Questions

don't know better title for this, but here's my code. I have class user
Don't be scared of the extensive code. The problem is general. I just provided
Don't know why but font is not displaying.Please help. CSS(in css folder): style.css: @font-face
Don't know what's wrong here, when I run the application it says Specified method
Don't know if this is an eclipse specific problem but whenever I declare a
Don't know why I can't reply to people on here with only a small
Don't think there's much to say, here's my code for (int i = 0;
Don't know a better title but here is what im trying to do. I
Don't know how to frase this but I found this code wich works as
Don't really know how to formulate the title, but it should be pretty obvious

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.