+ 1

I need help... I've been trying to create a module and import it on python with virtual studio but i keep getting error message.

8th Aug 2018, 8:53 PM
Samuel Adebodun
Samuel Adebodun - avatar
5 Respostas
+ 3
I get that you're frustrated. Trust me, I've been there. but that's not very helpful 😜 Where is your module? is it in a subdirectory of your project or is it external? If it's in your project, you need to import it from a package relative to the script being run so if your project structure looks like this: main.py - the program entry point /my_package my_module.py you need to import like: import my_package.my_module if your module is external to your project, you'll need to put it in a directory that pythons environment can access. (known as PYTHONPATH) The method of adding a directory to PYTHONPATH is OS specific but the quickest solution is to do: import sys sys.path.insert(0, "path/to/module/directory") import your_module
9th Aug 2018, 4:33 PM
Aidan Haddon-Wright
Aidan Haddon-Wright - avatar
+ 3
what's the error message?
8th Aug 2018, 10:23 PM
Aidan Haddon-Wright
Aidan Haddon-Wright - avatar
+ 3
If I helped you solve your problem, would you kindly accept my answer. otherwise, im sorry if I was no help
10th Aug 2018, 12:11 PM
Aidan Haddon-Wright
Aidan Haddon-Wright - avatar
+ 1
Intellisense couldn't find d module... Blah blah blah..
9th Aug 2018, 2:45 PM
Samuel Adebodun
Samuel Adebodun - avatar
0
Wow.. Thanks
10th Aug 2018, 11:23 AM
Samuel Adebodun
Samuel Adebodun - avatar