How do I add path to custom module

已回答

I have a custom module that I would like PyCharm to find.  The project gets built via gulp before its executed.  Custom modules from other projects get copied into a new build folder.  Those modules in the other folders are referenced in the current projects source.  Since they are not in the current source tree, but will be once executed, PyCharm does not recognize them and thus gives Unresolved references on the from xxx import yyy lines.  The paths to libraries are in PYTHONPATH currently.  

1

Hi Mark! You can add these custom modules to Interpreter Paths:

I believe it should help with unresolved references.

8
Avatar
Permanently deleted user

Mark - thanks for such an easy-to-follow answer!  Even though this is basic stuff, I'm new to PyCharm so it helped a lot.  (I'm running PyCharm Community 2019.1 for Windows, and the "Preferences" dialog is "Settings" on my computer: File > Settings..., or just Ctrl-Alt-S.)

Steve

0

Hello,

I'm new to PyCharm. I'm trying to import my custom module but haven't had much luck. When I tried to change the import path as shown in the picture above, I see a different window in my PyCharm. I'm using PyCharm for Mac OSX. 

Any help would be appreciated.

Thanks.

0

@Paisburg

Please share a screenshot showing the window that you see in PyCharm when following the instruction above.

 

0

Hello, 

Thanks for replying. I fixed it by adding the path to the interpreter and then starting a new project.

 

Thanks,

0

Hello, Can anyone please help me to fix issue that I can't run root_numpy library in pycharm. But when I run the same file in terminal using python3 command it works. So which thing or addition setting I have to do

Thank you.

0

@Amanasi634

What kind of error do you get when running it in PyCharm?
Most likely you are using two different interpreters. See https://intellij-support.jetbrains.com/hc/en-us/articles/360010202240

0

请先登录再写评论。