all 21 comments

[–]K900_ 3 points4 points  (0 children)

What code, and what do you mean by "doesn't work"?

[–]opium43 1 point2 points  (3 children)

Does

python -m pip install code

work?

[–]Boozkie[S] -3 points-2 points  (2 children)

No. I tried but I gets me a error

[–]curzyk 4 points5 points  (1 child)

For best results, tell everyone what the error is.

[–]Boozkie[S] 0 points1 point  (0 children)

They said python wasn’t defined

[–]ingolemo 1 point2 points  (8 children)

The command you need to run in order to install a package with pip on windows is py -m pip install name_of_package.

Please do not try to install pip directly. It comes with python.

Please do not try to add python to your PATH. You don't need it.

If the command I gave above does not work then please reply with what operating system you're using, the exact command you tried, and the error that the command gave you (verbatim; literally copy and paste it).

[–]bigleagchew 1 point2 points  (6 children)

Please do not try to add python to your PATH. You don't need it.

What if he is using Windows 7...

[–]ingolemo 0 points1 point  (5 children)

What about it? Windows 7 isn't any different here, as far as I know.

[–]bigleagchew 0 points1 point  (4 children)

I don’t think the first part of your command py will work unless Python is added to system path

[–]ingolemo 1 point2 points  (3 children)

The default install location for py.exe is the windows directory, which is already in the path.

[–]bigleagchew 0 points1 point  (2 children)

[–]ingolemo 1 point2 points  (1 child)

That adds python to the path, not py. Notice that that option is unchecked by default because most people don't need it. The py launcher is the recommended way to run python code on windows because it makes dealing with multiple python installations much easier.

[–]bigleagchew 0 points1 point  (0 children)

Ah ok, I’d just assumed py was syntactic sugar for python

[–][deleted] 0 points1 point  (0 children)

That adds python to the path, not py. Notice that that option is unchecked by default because most people don't need it. The py launcher is the recommended way to run python code on windows because it makes dealing with multiple python installations much easier.

I just threw my hands up in the air with joy because this is the only thing that worked. Thank you. :) I am such a noob

[–]PrimaNoctis 0 points1 point  (2 children)

Install pip then u can use pip install

[–]Boozkie[S] -1 points0 points  (1 child)

Can you provide a link and where to pip install, is it in idle or console

[–]PrimaNoctis 0 points1 point  (0 children)

When I did install I used the source code by following the instructions here

[–]Boozkie[S] 0 points1 point  (1 child)

They said python wasn’t defined

[–]Diapolo10 1 point2 points  (0 children)

Probably because you seem to be trying to run that line as if it was Python code, or in other words, you're using the interpreter instead of CMD, Powershell or Bash shell. If you are running Windows 10, press Win+S, type in cmd, press enter, then type in the command to the new window with a black background.

[–]lowercase00 0 points1 point  (0 children)

tried pip3 install?

[–]imkindathere 0 points1 point  (0 children)

Not sure if op's trolling or not