modules unable to import
Excuse me , I have a small issue.
Im scripting in python using pycharm and I am unsure where to save my modules at so that in the python console/projects I can import them for usage. please help many thanks to you.
Mac OS X Yosemite
Im scripting in python using pycharm and I am unsure where to save my modules at so that in the python console/projects I can import them for usage. please help many thanks to you.
Mac OS X Yosemite
Please sign in to leave a comment.
Once you create a project you can put Python files directly in the project folder (right click on it in the Project Explorer window and select New -> Python file). Or you can create sub-folders (packages) to organize your code.
Some more resources that might help:
http://confluence.jetbrains.com/display/PYH/Getting+Started+with+PyCharm
http://confluence.jetbrains.com/display/PYH/Exploring+the+IDE.+Quick+Start+Guide
What I basically do is create and keep open a project i can script in then run the code once ready. Though at times I test my code in the "python console" it would,'t let me import my "created" module into the console. But I will try all you have recommended. Thank you for returning a response in a timely manner sir.
Also check Settings -> Build, Execution... -> Console -> Python Console. Try checking "Add content roots to PYTHONPATH" and/or the source roots one. Restart the console if necessary.
If that still doesn't work you may have to provide some screenshots that illustrate what you're trying to do.
Delete all module "xxxx.ini" file and also remove ".idea" folder to your project. After that restart the Intellij then it work.