如何解决Anaconda中“python setup.py Egg_info未成功运行”,安装rasa

问题描述 投票:0回答:1

我最近安装了 Anaconda 和 Python (3.11.4)。 我在 Anaconda 中创建了我的环境,当我尝试安装 rasa (使用“pip install rasa”)时,conda 向我显示了此错误。 请帮助我

ERROR when i installed rasa pip

  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\Eliseo\AppData\Local\Temp\pip-install-qo_63x3c\absl-py_16e4b8fcbea9469084883112126934fa\setup.py", line 34, in <module>
          raise RuntimeError('Python version 2.7 or 3.4+ is required.')
      RuntimeError: Python version 2.7 or 3.4+ is required.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

我尝试卸载Python,并在Anaconda Prompt中“conda clean --all”。但这不起作用。

python pip anaconda rasa
1个回答
0
投票

在 Rasa 官方文档中,它说它与现代 Python 版本不兼容。最新且 100% 紧凑的是安装 python3.8

wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tar.xz
tar -xf Python-3.8.0.tar.xz
cd Python-3.8.0
./configure --enable-optimizations
make
sudo make altinstall

并创建您的应用程序。(tmp 路径上的示例)

cd /tmp/myapp
python3.8 -m venv venv
source venv/bin/activate
pip install rasa
source venv/bin/activate

注意,您可能会收到过时的点错误

pip install --upgrade pip
© www.soinside.com 2019 - 2024. All rights reserved.