jackfrued / jackfrued/Python-100-Days

MAC PyCharm中import Module问题

Open
#224 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
187k
Forks
55.8k
PR merge metrics
No merged PRs in 30d

Description

我在学习Day06课程时,在工程目录下创建了一个名为PythonDay06Module1.py的文件,再创建了一个PythonDay06.py文件,这2个文件是在同一个目录下,PythonDay06.py的内容:
import PythonDay06Module1 as m1

在PyCharm中,报错说No Module named PythonDay06Module1,导致引用不了。
我在Python中也配置了PATH路径,路径中包括了当前工程的路径

请问大神,我该如何解决?谢谢!
我用的是MAC

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the import problem in PyCharm using PythonDay06Module1.py and PythonDay06.py in the same project directory, starting with the interpreter and project configuration. Check why import PythonDay06Module1 as m1 cannot resolve the module; done means the import succeeds in PyCharm on macOS.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
developer-experience
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.