Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/355.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
我无法使用pip3安装python软件包_Python_Macos_Pip - Fatal编程技术网

我无法使用pip3安装python软件包

我无法使用pip3安装python软件包,python,macos,pip,Python,Macos,Pip,我已成功安装了pip3,但每当我尝试安装软件包时,都会出现以下错误(在macos high sierra终端上): 有人能帮忙吗 编辑:它使用正常的pip返回相同的错误。我试图安装的软件包与MacOS不兼容。默认情况下,在Apple计算机上安装了Python2(请按$Python--version检查),但是如果您需要Python3,则可以使用以下步骤- 安装Xcode和自制软件。对于Xcode,执行此操作-$Xcode选择--install。 然后安装自制/usr/bin/ruby-e“$(c

我已成功安装了pip3,但每当我尝试安装软件包时,都会出现以下错误(在macos high sierra终端上):

有人能帮忙吗


编辑:它使用正常的
pip
返回相同的错误。我试图安装的软件包与MacOS不兼容。

默认情况下,在Apple计算机上安装了Python2(请按
$Python--version
检查),但是如果您需要Python3,则可以使用以下步骤-

  • 安装Xcode和自制软件。对于Xcode,执行此操作-
    $Xcode选择--install
    。 然后安装自制
    /usr/bin/ruby-e“$(curl-fsSLhttps://raw.githubusercontent.com/Homebrew/install/master/install)“
  • 要确认已正确安装自制软件,请运行以下命令:
    $brew doctor

  • 安装Python3。执行此操作-
    $brew安装python3
  • 最后,通过
    $python3--version

  • 请准确分享您是如何运行
    pip
    的。您正在安装什么?返回此错误的命令是哪个?您是如何安装pip3的?返回此错误的命令是
    pip3 install python uinput
    @Z4 tier我想它是与python 3一起提供的
        libsuinput/src/suinput.c:25:10: fatal error: 'linux/limits.h' file not found
    #include <linux/limits.h>
             ^
    1 error generated.
    error: command 'gcc' failed with exit status 1
    
    ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/_4/bc_4xmsn63vb8kt8t5_g1wqm0000gn/T/pip-install-hby05qne/python-uinput/setup.py'"'"'; __file__='"'"'/private/var/folders/_4/bc_4xmsn63vb8kt8t5_g1wqm0000gn/T/pip-install-hby05qne/python-uinput/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/_4/bc_4xmsn63vb8kt8t5_g1wqm0000gn/T/pip-record-xlhm8d89/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.