解决Command “python setup.py egg_info“ failed with error code 1问题

在使用jetson nano安装 Jupyter Lab的时候
使用
sudo pip3 install jupyter jupyterlab
命令遇见

     File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 128, in setup
        _install_setup_requires(attrs)
      File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 123, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 513, in fetch_build_eggs
        replace_conflicting=True,
      File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 774, in resolve
        replace_conflicting=replace_conflicting
      File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1057, in best_match
        return self.obtain(req, installer)
      File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1069, in obtain
        return installer(requirement)
      File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 580, in fetch_build_egg
        return cmd.easy_install(req)
      File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 698, in easy_install
        return self.install_item(spec, dist.location, tmpdir, deps)
      File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 724, in install_item
        dists = self.install_eggs(spec, download, tmpdir)
      File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 909, in install_eggs
        return self.build_and_install(setup_script, setup_base)
      File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1177, in build_and_install
        self.run_setup(setup_script, setup_base, args)
      File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 1165, in run_setup
        raise DistutilsError("Setup script exited with %s" % (v.args[0],))
    distutils.errors.DistutilsError: Setup script exited with error: command 'aarch64-linux-gnu-gcc' failed with exit status 1
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-p4ad19id/argon2-cffi-bindings/

解决方法是更新 setuptools 和 pip:

pip3 install --upgrade setuptools		
//因为我用的是JETSON NANO所以才是pip3,普通用pip就好了,下面同理

python3 -m pip install --upgrade pip

安装成功

jupyterlab, jupyter
  Attempting uninstall: MarkupSafe
    Found existing installation: MarkupSafe 1.0
    Uninstalling MarkupSafe-1.0:
      Successfully uninstalled MarkupSafe-1.0
  Attempting uninstall: idna
    Found existing installation: idna 2.6
    Uninstalling idna-2.6:
      Successfully uninstalled idna-2.6
Successfully installed MarkupSafe-2.0.1 Send2Trash-1.8.0 anyio-3.5.0 argon2-cffi-21.3.0 argon2-cffi-bindings-21.2.0 async-generator-1.10 attrs-21.4.0 babel-2.10.1 backcall-0.2.0 bleach-4.1.0 cffi-1.15.0 contextvars-2.4 defusedxml-0.7.1 entrypoints-0.4 idna-3.3 immutables-0.17 ipykernel-5.5.6 ipython-7.16.3 ipywidgets-7.7.0 jedi-0.17.2 json5-0.9.7 jsonschema-3.2.0 jupyter-1.0.0 jupyter-client-7.1.2 jupyter-console-6.4.3 jupyter-core-4.9.2 jupyter-server-1.13.1 jupyterlab-3.2.9 jupyterlab-pygments-0.1.2 jupyterlab-server-2.10.3 jupyterlab-widgets-1.1.0 mistune-0.8.4 nbclassic-0.3.5 nbclient-0.5.9 nbconvert-6.0.7 nbformat-5.1.3 nest-asyncio-1.5.5 notebook-6.4.10 pandocfilters-1.5.0 parso-0.7.1 pexpect-4.8.0 pickleshare-0.7.5 prometheus-client-0.14.1 prompt-toolkit-3.0.29 ptyprocess-0.7.0 pycparser-2.21 pygments-2.12.0 pyrsistent-0.18.0 pyzmq-22.3.0 qtconsole-5.2.2 qtpy-2.0.1 sniffio-1.2.0 terminado-0.12.1 testpath-0.6.0 tornado-6.1 wcwidth-0.2.5 websocket-client-1.3.1 widgetsnbextension-3.6.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

最后一句出现

WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

是建议安装虚拟环境,比如conda

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值