0

I first installed Spyder and then afterwards Python on a server (with Windows Server 2019) all on the directory C:\Users\wi932. Now I want to use the command prompt to install packages (e.g. tensorflow) but unfortunately I get the error message that "the command pip is either wrongly written or can't be found "(translated). I am wondering why I get this error because on my normal laptop I type in the exact same commands and there everything is okay.

I have attached a screenshot of the command prompt. I tried to install the packages both in the spyder folder ( C:\Users\wi932.spyder-py3) and the Python folder ( C:\Users\wi932\Python\Python310). I always get the same error.

Does anyone of you have an idea what the problem might be and how to fix it? I'll appreciate every comment.

Screenshot command prompt Windows

9
  • The directory Python310 should contain the directory Scripts where pip is located. Commented Sep 17, 2021 at 8:54
  • @MichaelO.: Thanks for the command. Now pip can be found. However, it can't install many packages. While for some packages it is okay. For others I get errors. E.g when trying "pip install tensorflow" I get the error "pip install tensorflow ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none) ERROR: No matching distribution found for tensorflow". Or when trying "C:\Users\wi9632\Python\Python310\Scripts>pip install matplotlib Collecting matplotlib Using cached matplotlib-3.4.3.tar.gz (37.9 MB) ERROR: Command errored out with exit status 1:" Commented Sep 17, 2021 at 9:44
  • @MichaelO.: Is there maybe a way to directly import the packages to spyder? I only use Spyder for Python so it would be totally enough to use these packages only in Spyder (and no other Python environment like jupyter). Commented Sep 17, 2021 at 9:46
  • Try to install Python 3.8 or 3.9. To avoid problems with pip, on the first window of the installation program there is a checkbox Add Python to PATH. Commented Sep 17, 2021 at 9:47
  • @MichaelO.: Thanks for your comment. I did exactly what you suggested. I installed the latest version of Python (after deleting the old version) and I set the checkbox "Add Python to Path". However, the problems still remain the same. When trying to install tensorflow or matplotlib I get the same error messages. Commented Sep 17, 2021 at 10:05

2 Answers 2

1

The directory containing pip is located in <Python directory>\Scripts. To make Windows find it, you need to check the "Add Python to PATH" checkbox during installation.

Some packages, including tensorflow, have no version for the last Python distro, so you need to "downgrade" it by installing an older version, for example, 3.8.

Sign up to request clarification or add additional context in comments.

Comments

0

Try installing python in local download it at www.python.org then you can run any command with pip directly in local

2 Comments

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
Thanks for your answer Augustin. What do you mean by local? Basically I am using a server with multiple users

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.