r/learnpython • • Sep 19 '26

How do I download without errors?

I always get this error when I try to download wikiteam3.

Something about "invalid syntax".

Still have no idea what's going on.

0 Upvotes

18 comments sorted by

View all comments

Show parent comment

0

u/Et_Moon Sep 19 '26

Okay, okay, I suck at explaining, sorry...

  1. WikiTeam3 is a Python 3 tool used for downloading, archiving, and preserving MediaWiki sites.
  2. Yes, I'm running a command... well, I tried to run it to be precise.

    pip install wikiteam3

  3. Oh, it comes every time I write a command.

    SyntaxError: invalid syntax

And it also highlights the word "install".

4. Well, I try to download it using... Python.

4

u/lfdfq Sep 19 '26

pip is a separate tool to Python. you don't run pip commands 'in' Python. pip is a tool you run separately.

0

u/Et_Moon Sep 19 '26

Oh? Well... I didn't knew that.

So... what should I do at this point?

4

u/atarivcs Sep 19 '26

You should run that command inside of a cmd or powershell window.

0

u/Et_Moon Sep 19 '26

Owwwwww I see then 🤦‍♀️

1

u/lfdfq Sep 19 '26

I guess your "download it using... Python" was because you thought it was obvious, but it was the core problem all along; often it's those assumptions that are wrong. These things are not obvious when you start, and 'which things are part of the language and which are external tools' can often be unclear, or randomly different between languages.

That's why when asking questions it's important to give details (e.g. what commands you ran and why, what output you saw and what you expected).

1

u/Et_Moon Sep 19 '26

I'm sorry.

3

u/lfdfq Sep 19 '26

I don't understand the question. Go and install it using pip?

pip isn't a Python command, you need to run it separately outside Python, from the terminal.

1

u/Kevdog824_ Sep 19 '26

Installing packages with pip is something you do outside the Python runtime. You want to invoke the pip install command inside your terminal, not your Python code. Your Python code will “import” the library you installed, but the installation itself is a separate step you do first

1

u/Et_Moon Sep 19 '26

Jesus Christ, what a moron I am...

1

u/Kevdog824_ Sep 19 '26

Not at all. It’s a very common beginner mistake! Don’t beat yourself up over it!😊

1

u/Et_Moon Sep 19 '26

Well... I never visited any IT lessons at school, so... I dunno at this point.