Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Pip on Msys

I have built a simple PyGTK app using Python 3.5.2 and Msys but I need some modules not in the default installation, and although I could use setup.py install to get them I would much rather use pip.

I looked around and found this but it relates to Python 2 and gave an error when attempting to follow the instructions given:

$ python3 getpip.py

Collecting pip
  Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB)
Collecting setuptools
  Using cached setuptools-38.2.5-py2.py3-none-any.whl
Collecting wheel
  Using cached wheel-0.30.0-py2.py3-none-any.whl
Installing collected packages: pip, setuptools, wheel
Exception:
Traceback (most recent call last):
  File "C:\Users\Simon\AppData\Local\Temp\tmpoumuod3r\pip.zip\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "C:\Users\Simon\AppData\Local\Temp\tmpoumuod3r\pip.zip\pip\commands\install.py", line 342, in run
    prefix=options.prefix_path,
  File "C:\Users\Simon\AppData\Local\Temp\tmpoumuod3r\pip.zip\pip\req\req_set.py", line 784, in install
    **kwargs
  File "C:\Users\Simon\AppData\Local\Temp\tmpoumuod3r\pip.zip\pip\req\req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "C:\Users\Simon\AppData\Local\Temp\tmpoumuod3r\pip.zip\pip\req\req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "C:\Users\Simon\AppData\Local\Temp\tmpoumuod3r\pip.zip\pip\wheel.py", line 462, in move_wheel_files
    generated.extend(maker.make(spec))
  File "C:\Users\Simon\AppData\Local\Temp\tmpoumuod3r\pip.zip\pip\_vendor\distlib\scripts.py", line 372, in make
    self._make_script(entry, filenames, options=options)
  File "C:\Users\Simon\AppData\Local\Temp\tmpoumuod3r\pip.zip\pip\_vendor\distlib\scripts.py", line 276, in _make_script
    self._write_script(scriptnames, shebang, script, filenames, ext)
  File "C:\Users\Simon\AppData\Local\Temp\tmpoumuod3r\pip.zip\pip\_vendor\distlib\scripts.py", line 212, in _write_script
    launcher = self._get_launcher('t')
  File "C:\Users\Simon\AppData\Local\Temp\tmpoumuod3r\pip.zip\pip\_vendor\distlib\scripts.py", line 351, in _get_launcher
    result = finder(distlib_package).find(name).bytes
AttributeError: 'NoneType' object has no attribute 'bytes'

and I tried the way one would install pip on Linux:

pacman -S python2-pip           
pacman -S python-pip           

as listed here, as well as:

pacman -S python3-pip

but each time I got a error: target not found: error.

Surprisingly I couldn't find anything else.

So how do I get pip on Msys?

Thanks.

like image 731
Xantium Avatar asked Jan 04 '18 00:01

Xantium


People also ask

Why is pip not on path?

One of the most common problems with running Python tools like pip is the “not on PATH” error. This means that Python cannot find the tool you're trying to run in your current directory. In most cases, you'll need to navigate to the directory in which the tool is installed before you can run the command to launch it.

Does pip install from PyPi?

Install moduleIt can install packages from the PyPi repository. It's the official repository for python modules. Software you install with pip is downloaded from the PyPi repo and installed.

Does pip install global packages?

The Pip Package Manager can be used to list both globally and locally installed Python packages.


1 Answers

Please note that at this time the following command is now working on msys2:

$ pacman -S python3-pip
$ pip3 install --upgrade pip
like image 124
user8128167 Avatar answered Oct 14 '22 13:10

user8128167