本文介绍了在Msys上安装Pip的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Python 3.5.2和Msys构建了一个简单的PyGTK应用程序,但是我不需要默认安​​装中的某些模块,尽管我可以使用setup.py install来获取它们,但我还是更愿意使用pip.

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.

我环顾四周,发现,但它与Python 2和尝试遵循给出的说明时出现错误:

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'

,我尝试了一种在Linux上安装pip的方式:

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

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

列在此处,以及:

pacman -S python3-pip

但是每次我出现error: target not found:错误.

令人惊讶的是我什么也找不到.

Surprisingly I couldn't find anything else.

那么如何在Msys上获取pip?

So how do I get pip on Msys?

谢谢.

推荐答案

请注意,此时,以下命令正在msys2上运行:

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

$ pacman -S python3-pip
$ pip3 install --upgrade pip

这篇关于在Msys上安装Pip的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-11 13:14