Python Forum
Unable to import my own module
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unable to import my own module
#1
Hi everyone,

I am relatively new to python but I am trying to use it more extensively for post-processing of fluid mechanics data.
I am currently working under Windows 10 and I am using Spyder (Python 3.7). I created my own module Plottings.py which contains some plotting functions. Once I created the module I copied it in: C:\Users\ThePhantom\AppData\Local\Programs\Python\Python38-32\Lib\site-packages

Now, wherever I am located if I open Spyder and type:
import Plottings as myPlot
myPlot.
Pressing Tab I can actually see all the functions contained in Plottings (which means that the module is visible) BUT when I run it, it gave me back this error:
ModuleNotFoundError: No module named 'Plottings'
The only way I could solve this problem is to include Plottings.py in the folder where I am running the test case.
I appreciate your help. Thanks!
Reply


Messages In This Thread
Unable to import my own module - by ThePhantom - Apr-30-2020, 11:19 PM
RE: Unable to import my own module - by menator01 - Apr-30-2020, 11:35 PM
RE: Unable to import my own module - by ThePhantom - May-01-2020, 01:16 AM
RE: Unable to import my own module - by menator01 - May-01-2020, 01:30 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  is import cointegration_analysis a recognized module mitcht33 1 565 Nov-06-2023, 09:29 PM
Last Post: deanhystad
  problem in import module from other folder akbarza 5 1,896 Sep-01-2023, 07:48 AM
Last Post: Gribouillis
  can not import anaconda pandas module. PySpark pandas module is imported!! aupres 0 846 Aug-06-2023, 01:09 AM
Last Post: aupres
  import module error tantony 5 3,752 Dec-15-2022, 01:55 PM
Last Post: Lauraburmrs
  Import a module one step back of the path prathampatel9 1 1,179 Sep-21-2022, 01:34 PM
Last Post: snippsat
  Import a module for use in type hint? Milosz 0 1,584 Nov-08-2021, 06:49 PM
Last Post: Milosz
  Can't install nor import delorean module Tek 3 3,013 Oct-27-2021, 03:32 AM
Last Post: Tek
  Unable to import sklearn after installing any package ilango 0 1,291 Oct-25-2021, 07:03 AM
Last Post: ilango
  Unable to import Private Repo using setup.py Bob786 1 1,847 Sep-02-2021, 04:19 PM
Last Post: snippsat
  import module with syntax error Skaperen 7 5,665 Jun-22-2021, 10:38 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020