Python Forum
Problem with importing an installed package
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with importing an installed package
#1
I installed pymsgbox using pip. I created a sample file that does only

import pymsgbox
pymsgbox.alert("some text")
When I run it from the command line (like most of my scripts) by typing "sample" I just get "ModuleNotFoundError: No module named 'pymsgbox'". When I run it by typing "python sample.py", or when I run it through IDLE, or when I run python.exe and type the code in manually, everything runs just fine. Can someone suggest how to fix this (I suspect a config problem of some sort)?
Reply


Messages In This Thread
Problem with importing an installed package - by Reverend_Jim - Jun-09-2019, 06:18 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  problem install somewhere package akbarza 1 508 Dec-27-2023, 01:25 PM
Last Post: Gribouillis
  imdby package problem lunacy90 8 1,185 Sep-04-2023, 07:13 PM
Last Post: deanhystad
  when package built, requirements not installed sabuzaki 1 767 Apr-07-2023, 09:01 AM
Last Post: sabuzaki
  Problem with importing python-telegram library into the project gandonio 1 1,602 Nov-01-2022, 02:19 AM
Last Post: deanhystad
  Problem with importing Python file in Visual Studio Code DXav 7 5,195 Jun-15-2022, 12:54 PM
Last Post: snippsat
  Problem: Restart kernel onPydev console when trying to install a python package poppy2020 1 7,749 Nov-25-2020, 06:13 PM
Last Post: Larz60+
  pip list to show all versions of a package installed pvbadiger05b 4 2,523 May-21-2020, 06:48 PM
Last Post: jameshonest
  Package installed through Anaconda "not found" by Python zonova 0 2,323 May-08-2020, 11:50 PM
Last Post: zonova
  Importing module from a package results in import error goghvv 2 2,422 Mar-27-2020, 07:13 PM
Last Post: goghvv
  Error importing package julio2000 3 3,812 Jan-26-2020, 06:15 PM
Last Post: buran

Forum Jump:

User Panel Messages

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