Centos7 python3 安装 feapder[all] 问题

    Running setup.py install for bitarray ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-a0mh_oua/bitarray_0350c024fd4c4824b88a3c7d441691ab/setup.py'"'"'; __file__='"'"'/tmp/pip-install-a0mh_oua/bitarray_0350c024fd4c4824b88a3c7d441691ab/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-mbmj0rly/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6m/bitarray
         cwd: /tmp/pip-install-a0mh_oua/bitarray_0350c024fd4c4824b88a3c7d441691ab/
    Complete output (30 lines):
    /usr/local/lib/python3.6/site-packages/setuptools/dist.py:720: UserWarning: Usage of dash-separated 'index-url' will not be supported in future versions. Please use the underscore name 'index_url' instead
      % (opt, underscore_opt)
    running install
    /usr/local/lib/python3.6/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      setuptools.SetuptoolsDeprecationWarning,
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    creating build/lib.linux-x86_64-3.6/bitarray
    copying bitarray/util.py -> build/lib.linux-x86_64-3.6/bitarray
    copying bitarray/test_util.py -> build/lib.linux-x86_64-3.6/bitarray
    copying bitarray/__init__.py -> build/lib.linux-x86_64-3.6/bitarray
    copying bitarray/test_bitarray.py -> build/lib.linux-x86_64-3.6/bitarray
    copying bitarray/pythoncapi_compat.h -> build/lib.linux-x86_64-3.6/bitarray
    copying bitarray/bitarray.h -> build/lib.linux-x86_64-3.6/bitarray
    copying bitarray/test_data.pickle -> build/lib.linux-x86_64-3.6/bitarray
    copying bitarray/py.typed -> build/lib.linux-x86_64-3.6/bitarray
    copying bitarray/__init__.pyi -> build/lib.linux-x86_64-3.6/bitarray
    copying bitarray/util.pyi -> build/lib.linux-x86_64-3.6/bitarray
    running build_ext
    building 'bitarray._bitarray' extension
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/bitarray
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python3.6m -c bitarray/_bitarray.c -o build/temp.linux-x86_64-3.6/bitarray/_bitarray.o
    bitarray/_bitarray.c:12:20: fatal error: Python.h: No such file or directory
     #include "Python.h"
                        ^
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-a0mh_oua/bitarray_0350c024fd4c4824b88a3c7d441691ab/setup.py'"'"'; __file__='"'"'/tmp/pip-install-a0mh_oua/bitarray_0350c024fd4c4824b88a3c7d441691ab/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-mbmj0rly/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6m/bitarray Check the logs for full command output.

1. 首先安装 apt-get

curl https://raw.githubusercontent.com/dvershinin/apt-get-centos/master/apt-get.sh -o /usr/local/bin/apt-get

apt-get安装成功提示

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1256  100  1256    0     0   1283      0 --:--:-- --:--:-- --:--:--  1284

1.1 修改权限

chmod 0755 /usr/local/bin/apt-get

2. 安装 python3-devel

 sudo /usr/local/bin/apt-get install python3-devel

3. 执行

pip3 install pybloom_live

4. 安装 feapder[all]

pip3 install feapder[all]

5. 安装时若出现 No module named 'setuptools_rust'

    Complete output from command python setup.py egg_info:

            =============================DEBUG ASSISTANCE==========================
            If you are seeing an error here please try the following to
            successfully install cryptography:

            Upgrade to the latest pip and try again. This will fix errors for most
            users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
            =============================DEBUG ASSISTANCE==========================

    Traceback (most recent call last):
      File "", line 1, in 
      File "/tmp/pip-build-5o6cgiq8/cryptography/setup.py", line 14, in 
        from setuptools_rust import RustExtension
    ModuleNotFoundError: No module named 'setuptools_rust'

    ----------------------------------------

5.1 执行

pip3 install -U pip setuptools

6. 重新安装 feapder[all]

你可能感兴趣的:(python,python,linux,centos,爬虫)