python - 在 Msys 上安装 Pip

标签 python python-3.x pip msys

我已经使用 Python 3.5.2 和 Msys 构建了一个简单的 PyGTK 应用程序,但我需要一些不在默认安装中的模块,虽然我可以使用 setup.py install 来获取它们,但我非常愿意而是使用 pip

我环顾四周,发现 this但它与 Python 2 相关,并在尝试按照给出的说明进行操作时出错:

$ 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 的方法:

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

如所列here ,以及:

pacman -S python3-pip

但每次我都收到一个error: target not found:错误。

令人惊讶的是我找不到其他任何东西。

那么如何在 Msys 上获取 pip 呢?

谢谢。

最佳答案

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

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

关于python - 在 Msys 上安装 Pip,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48087004/

相关文章:

Python BigQuery 存储。并行读取多个流

python - 删除属于特定命名空间的所有 XML 元素

python - 每次当我想使用多个 python 版本中的 python3 时,都需要取消设置 PYTHONPATH

python - 如何从 `stdin` 创建非阻塞连续读取?

python - 使用python在多个空格上拆分字符串

Python导入旧版本包而不是新版本包

python - 如何使用 'pip install' 在 Windows 上安装 NumPy?

python - 管理用于测试自动化的 Python 和 Python 包版本

python - 将 float64 numpy 数组转换为不以科学计数法表示的 float

python - 什么是 Python 3 中的 find()?