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
0
5 comments
You should create a Project to hold your code.  Normally everything needs to be inside a Project in order to work correctly for running and debugging and the console.

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
0
ty I will go through the steps again.

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.
0
Make sure your project has a valid Python interpreter set in Settings -> Interpreter.

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.
0
Alright i'll give it a go and return some feed back shortly. It's kinda funny b/c I have been picking up on the language pretty fast and I hit a wall on something that i know is more then likely really easy to do/ ;X
0

Delete all module "xxxx.ini" file and also remove ".idea" folder to your project. After that restart the Intellij then it work.

0

Please sign in to leave a comment.