Python Forum

Full Version: Installing Packages
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I'm very new to python. One of the things I wanted to do was to install the package pydicom however the commands keeps failing. I am following an instruction manual, my shell is Thonny and I'm trying to use pip to install the package. Here is the code I have written:

import pip
python3 -m pip install pydicom 
And here is the error:
Error:
python3 -m pip install pydicom ^ SyntaxError: invalid syntax
Any help or advice on what I'm doing wrong would be greatly appreciated!

Thanks
Cydney
you need to execute python3 -m pip install pydicom in terminal/command prompt.
Note, if you are using virtual environment, it should be activated
Hi Buran,

Thank you for replying!

What do you mean by the terminal? I have tried executing the command from everywhere I can find and it always has the same error?
Hi Buran,

After reading the link you have sent I am assuming by the terminal you mean to type it directly into python? Here is the error if I do:

Output:
File "<stdin>", line 1 python3 -m pip install pydicom ^ SyntaxError: invalid syntax
No, not in python, in cmd (i.e. Command prompt). Obviously you don't know what cmd is, that is why I sent you the link.
that is c:/>python3 -m pip install pydicom
Oh right I see!

I'm sorry I do know of cmd but assumed you must be referring to a feature within python because my instruction manual didn't mention moving to cmd.

Thank you very much for responding and being so patient!
Cydney