Skip to content

常见报错

Ubuntu下conda安装uwsgi安装不上

conda + ubuntu20.04 + python3.9

终端执行下面命令安装不上:

(base) moluo@ubuntu:~/Desktop/luffycity$ conda install uwsgi
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - uwsgi

Current channels:

  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/noarch
  - https://repo.anaconda.com/pkgs/main/linux-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/linux-64
  - https://repo.anaconda.com/pkgs/r/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

然后执行下面的命令:

(base) moluo@ubuntu:~/Desktop/luffycity$ conda install -c conda-forge uwsgi
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.

经过查寻,这个conda-forge的channels不存在:

(base) moluo@ubuntu:~/Desktop/luffycity$ conda config --show channels
channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - defaults

那就给它添加上conda-forge的channels:

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes

云服务器centos7安装不上uwsgi

报错内容:

1832669394690375680.png

解决办法之一就是降低版本:

bash
pip install uwsgi==2.0.18 -i https://pypi.tuna.tsinghua.edu.cn/simple