簡體   English   中英

在同一個 conda 環境中安裝 Python3.9 和 PyPy3.7

[英]Install Python3.9 and PyPy3.7 in same conda environment

我在我的 mac os 10.13.6 上安裝了 miniconda,我想在我已經安裝 Python3.9 的同一個PyPy3.7環境中安裝Python3.9 但是,當我嘗試安裝 PyPy 時,出現以下依賴錯誤。

(my_conda_env)$ conda install -c conda-forge pypy3.7
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.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: - 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                                                                                             

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

Package ncurses conflicts for:
python=3.9 -> readline[version='>=8.0,<9.0a0'] -> ncurses[version='>=6.1,<6.3.0a0|>=6.1,<7.0a0']
python=3.9 -> ncurses[version='>=6.2,<6.3.0a0|>=6.2,<7.0a0']

Package openssl conflicts for:
python=3.9 -> openssl[version='>=1.1.1h,<1.1.2a|>=1.1.1i,<1.1.2a|>=1.1.1j,<1.1.2a|>=1.1.1k,<1.1.2a']
pypy3.7 -> openssl[version='>=1.1.1i,<1.1.2a|>=1.1.1k,<1.1.2a']

Package libcxx conflicts for:
python=3.9 -> libcxx[version='>=10.0.0|>=10.0.1|>=11.0.0|>=11.0.1']
python=3.9 -> libffi[version='>=3.3,<3.4.0a0'] -> libcxx[version='>=4.0.1|>=9.0.1']

這很奇怪,因為三個沖突中有兩個似乎是由於 python3.9 與自身發生沖突。 此外,從下面的信息可以看出, opensslncurseslibcxx的安裝版本應該滿足上述所有約束。 有什么幫助嗎?

(my_conda_env)$ conda list
# packages in environment at /Users/Sirion/miniconda3/envs/ro:
#
# Name                    Version                   Build  Channel
...
libcxx                    11.1.0               habf9029_0    conda-forge
libffi                    3.3                  h046ec9c_2    conda-forge
...
ncurses                   6.2                  h2e338ed_4    conda-forge
...
openssl                   1.1.1k               h0d85af4_0    conda-forge
...
python                    3.9.4           h9133fd0_0_cpython    conda-forge
python_abi                3.9                      1_cp39    conda-forge
readline                  8.1                  h05e3726_0    conda-forge
...

(my_conda_env)$ conda info

     active environment : my_conda_env
    active env location : -- OMISSIS --
            shell level : 2
       user config file : -- OMISSIS --
 populated config files : -- OMISSIS --
          conda version : 4.10.1
    conda-build version : not installed
         python version : 3.8.0.final.0
       virtual packages : __osx=10.13.6=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : -- OMISSIS --  (writable)
      conda av data dir : -- OMISSIS --
  conda av metadata url : https://repo.anaconda.com/pkgs/main
           channel URLs : http://conda.anaconda.org/gurobi/osx-64
                          http://conda.anaconda.org/gurobi/noarch
                          https://conda.anaconda.org/conda-forge/osx-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/osx-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/osx-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : -- OMISSIS --
                          -- OMISSIS --
       envs directories : -- OMISSIS --
                          -- OMISSIS --
               platform : osx-64
             user-agent : conda/4.10.1 requests/2.25.1 CPython/3.8.0 Darwin/17.7.0 OSX/10.13.6
                UID:GID : 501:20
             netrc file : None
           offline mode : False

不可能。 Conda 的沖突報告不可靠。 mamba代替運行清楚地表明pypy3.7具有python=3.7約束,即不能在同一環境中共同安裝 Python 3.9。

曼巴Output

$ mamba create -n foo python=3.9 pypy3.7

                  __    __    __    __
                 /  \  /  \  /  \  /  \
                /    \/    \/    \/    \
███████████████/  /██/  /██/  /██/  /████████████████████████
              /  / \   / \   / \   / \  \____
             /  /   \_/   \_/   \_/   \    o \__,
            / _/                       \_____/  `
            |/
        ███╗   ███╗ █████╗ ███╗   ███╗██████╗  █████╗
        ████╗ ████║██╔══██╗████╗ ████║██╔══██╗██╔══██╗
        ██╔████╔██║███████║██╔████╔██║██████╔╝███████║
        ██║╚██╔╝██║██╔══██║██║╚██╔╝██║██╔══██╗██╔══██║
        ██║ ╚═╝ ██║██║  ██║██║ ╚═╝ ██║██████╔╝██║  ██║
        ╚═╝     ╚═╝╚═╝  ╚═╝╚═╝     ╚═╝╚═════╝ ╚═╝  ╚═╝

        mamba (0.11.1) supported by @QuantStack

        GitHub:  https://github.com/mamba-org/mamba
        Twitter: https://twitter.com/QuantStack

█████████████████████████████████████████████████████████████


Looking for: ['python=3.9', 'pypy3.7']

bioconda/osx-64          [====================] (00m:01s) Done
bioconda/noarch          [====================] (00m:01s) Done
pkgs/r/noarch            [====================] (00m:00s) No change
pkgs/r/osx-64            [====================] (00m:00s) No change
pkgs/main/osx-64         [====================] (00m:01s) Done
pkgs/main/noarch         [====================] (00m:00s) Done
conda-forge/noarch       [====================] (00m:01s) Done
conda-forge/osx-64       [====================] (00m:04s) Done

Encountered problems while solving:
  - package pypy3.7-7.3.3-hb2afd79_3 has constraint python 3.7.* *_73_pypy conflicting with python-3.9.0-h88f2d9e_1

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM