Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Installing Packages
#1
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
Reply
#2
you need to execute python3 -m pip install pydicom in terminal/command prompt.
Note, if you are using virtual environment, it should be activated
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
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?
Reply
#4
Introduction to Windows Command Prompt
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#5
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
Reply
#6
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
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#7
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Installing python packages in a virtual environment Led_Zeppelin 1 712 Aug-15-2023, 08:18 PM
Last Post: deanhystad
  installing prospector and updating anaconda packages amir 2 958 Dec-24-2022, 06:13 AM
Last Post: amir
  Installing Modules / packages Oshadha 1 1,676 Feb-05-2021, 08:04 PM
Last Post: Jeff900
  Getting error while installing packages using pip Shreya 2 3,959 Apr-22-2020, 08:03 AM
Last Post: Shreya
  Installing PIP packages issue Renym 2 3,008 Dec-09-2019, 04:44 PM
Last Post: Axel_Erfurt
  Python 3.8 or 3.? Trouble installing packages dn237 5 6,721 Oct-25-2019, 07:21 PM
Last Post: snippsat
  errors while installing packages kavindu 3 5,093 Apr-02-2018, 02:33 AM
Last Post: giri_ginanjar
  installing packages Globally vs Virtually karaokelove 2 2,956 Jan-03-2018, 11:29 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

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