After viktor-cli install no module named 'pip'

When I want to install viktor-cli I got the following error:

ModuleNotFoundError: No module named ā€˜pipā€™
Exiting because of an error: installation of the app failed

Does someone know how to fix this?

image

Hi Jip,

pip is the package manager of Python. It normally comes with your Python installation. Several questions to help pinpoint the problem:

  • Does viktor-cli check-system return without any problems?
  • What Python version / distribution are you using?
  • What OS and isolation mode did you select?

Regards,

Raoul

Hi Raoul,

To answer your questions,

  • There are no problems: V Your system is ready to use VIKTOR with isolation mode ā€˜venvā€™
  • Iā€™m using Python version 3.9
  • the isolation mode is ā€˜venvā€™ and the OS is Windows 10

Regards,
Jip

Hi Jip,

  • Is it possible you are using Anaconda? It uses a different package manager than pip
    • You could check this by running conda --version in your terminal .
    • If that tells you a version, and not ā€œconda is not recognisedā€ you should be able to install pip with conda install pip
  • If you are not using Anaconda, can you run the following two commands in your terminal? I have seen pip renamed as pip3 sometimes.
    • pip --version
    • pip3 --version

Hi,

  • I donā€™t use Anaconda if I try conda --version. I got: conda: command not found.
  • After doing pip --version. I got :
    **Command ā€˜pipā€™ not found, but can be installed with: sudo apt install python3-pip

I tried that but than I got:

Reading package listsā€¦ Done
Building dependency tree
Reading state informationā€¦ Done
Package python3-pip is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package ā€˜python3-pipā€™ has no installation candidate

Regards,
Jip

Hi Jip,

You said you are using windows, however is it possible you are using Windows Subsystem for Linux (WSL)? Because this tells you to install pip using sudo apt install python3-pip which is a Linux command, not a Windows command. WSL behaves as a Linux computer inside your Windows machine.

If that is the case, you can use that command to install pip. If you have never used WSL before, it is likely it will tell you that you have to update apt as well. You can do that with sudo apt update

regards,
Paulien

Hi Paulien,

Ah sorry, that is what Iā€™m using. After using sudo apt update, I could use sudo apt instlal python3-pip. But then I tried to install vicktor-cli and got the same error as before.

ModuleNotFoundError: No module named ā€˜pipā€™
Exiting because of an error: installation of the app failed

Regards,
Jip

Hi Jip, could it be installed as pip3 instead of pip. i.e. is pip3 --version still not recognised as well?

Hi Paulien,

If I try to install pip3 instead of pip, I got the following error:

  • E: Unable to locate package python3-pip3

But the pip and the pip3 --versions are recognised:

  • pip3 --version
    • pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)
  • pip --version
    • pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)

Regards,
Jip

Hi Jip,

You said you use python3.9, but the pip versions you list seem linked to python3.8? Maybe that is where the problem is?

The problem was caused by the fact that a Windows version of the CLI was installed and executed, while a Linux version of the CLI is required when developing on WSL2.