#đź”’ Error message when installing packages.

57 messages · Page 1 of 1 (latest)

dapper otter
#

Hi!

The following error appears when I try to install the package “sklearn.cluster”:

pip : The name “pip” was not recognized as the name of a cmdlet, a function, a script file or an executable program. Check the spelling of the name, or
whether the path is correct (if included), and repeat the process.
In line:1 char:1

  • pip install scikit-learn
  •   + CategoryInfo : ObjectNotFound: (pip:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
cloud iglooBOT
#

@dapper otter

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

twin leaf
#

Instead of using pip directly, try
py -m pip install scikit-learn

dapper otter
#

I have already done this and scikit has also been installed. Now I get this message:

Requirement already satisfied: scikit-learn in c:\users\maxik\appdata\local\programs\python\python312\lib\site-packages (1.5.1)
Requirement already satisfied: numpy>=1.19.5 in c:\users\maxik\appdata\local\programs\python\python312\lib\site-packages (from scikit-learn) (2.0.1)
Requirement already satisfied: scipy>=1.6.0 in c:\users\maxik\appdata\local\programs\python\python312\lib\site-packages (from scikit-learn) (1.14.0)
Requirement already satisfied: joblib>=1.2.0 in c:\users\maxik\appdata\local\programs\python\python312\lib\site-packages (from scikit-learn) (1.4.2)
Requirement already satisfied: threadpoolctl>=3.1.0 in c:\users\maxik\appdata\local\programs\python\python312\lib\site-packages (from scikit-learn) (3.5.0)

#

sklearn.cluster is still underlined in the code...

twin leaf
#

Can you show the code?

dapper otter
#

yeah

#

How should I share it? Just copy and paste it into the chat?

twin leaf
#

yeah

#

!code

cloud iglooBOT
#
Formatting code on Discord

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

For long code samples, you can use our pastebin.

dapper otter
#

!code

#

But I'm pretty sure that it's not the code, but visual studio code :=)

warm summit
dapper otter
#

The package seems to be installed but still does not work :/

warm summit
# dapper otter

simply run that file from command line not visual studio code

#

like this

#

py path/to/file.py

#

py Mosaik_gesichtsoptimiert.py

dapper otter
#

doesnt work either :/

#

By the way: When I enter “python --version” in the terminal in visual studio code, the error message “Python could not be found. Run the shortcut without arguments to install it via the Microsoft Store or disable this shortcut under
PS C:\Users\maxik> py path/to/file.py”

warm summit
#

try to fix it

twin leaf
#

py --version

dapper otter
#

I dont get it

twin leaf
#

maybe there are multiple python versions installed and it confuses python?
try
py -0

dapper otter
twin leaf
#

so maybe it got installed to v 3.9 somehow
Did you run the install command from the VSCode terminal?

dapper otter
#

you mean did i download python via visual studio code?

twin leaf
#

I mean this command, did you run it from the VSCode terminal?
py -m pip install scikit-learn

dapper otter
#

yeah

twin leaf
#

Then I don't know what the issue is, sorry

dapper otter
#

Does it make sense if I simply remove the older of the two python versions from my computer?

twin leaf
#

Are you on Windows?

dapper otter
#

yes

twin leaf
#

Then yes, I don't think that should cause any issues

dapper otter
#

1 sec

#

Now I get even more error messages because of other packages that are apparently not installed...

#

But now the sklearn.cluster package works...

twin leaf
#

Time to install those packages

dapper otter
#

I made it for openpyxl... but it is still underlined in the code...

twin leaf
#

Weird

#

At the bottom right of VSCode, it should show your version of Python, can you click on it? Does it show multiple interpreters?

dapper otter
twin leaf
#

Hmm
Maybe close VSCode and open it again? It bugs out sometimes

dapper otter
#

lol... now it works

twin leaf
#

All the packages?

dapper otter
#

yeah 1 sec

#

Yes, all packages work... i don't know why i can install the packages via “py -m pip” and not via “pip install”, but anyway...

warm summit
#

Early i said your code has syntax issue...

cloud iglooBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.