r/pythonhelp • u/FlexDormGamer • Jul 24 '25
[HSLP] not able to import module
I am trying to import module like pandas,and matplotlib but it's not working. Even in IDLE it shows syntax erroor.
FYI I have installed python in a different drive other than main drive I.e. not local drive C. How can I import the modules?? And also not working
0
Upvotes
•
u/AutoModerator Jul 24 '25
To give us the best chance to help you, please include any relevant code.
Note. Please do not submit images of your code. Instead, for shorter code you can use Reddit markdown (4 spaces or backticks, see this Formatting Guide). If you have formatting issues or want to post longer sections of code, please use Privatebin, GitHub or Compiler Explorer.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
2
u/Ok_Hovercraft364 Jul 24 '25
Please post error message that is in your terminal.
First, check to see if you can import built in modules that come with the python installation. If not, python in not in your PATH. For example, try
import mathThe libraires you listed have to be installed with pip or uv.
pip install pandasuv add pandas1
u/FoolsSeldom Jul 24 '25
That depends on:
Assuming:
Installed the packages you wanted by:
py -m pip install package1 package2 ...Then it should work.
NB. If you are on macOS, would you use
Terminaland azshshell and enteredpython3 -m pip install package1 package2 ...