简体   繁体   English

使用 anaconda 安装 fipy 的最佳方法是什么?

[英]What is the best way to install fipy with anaconda?

What is the best way to install fipy with anaconda3 (in a ubuntu 16.04 machine)?使用 anaconda3 安装 fipy的最佳方法是什么(在 ubuntu 16.04 机器中)?
I have tried conda create --name FIPY --channel conda-forge python=3 fipy numpy scipy matplotlib pysparse gmsh but the results in a lot of conflicts like this:我试过conda create --name FIPY --channel conda-forge python=3 fipy numpy scipy matplotlib pysparse gmsh ,但结果如下:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
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 libstdcxx-ng conflicts for:
numpy -> python[version='>=3.8,<3.9.0a0'] -> libstdcxx-ng[version='>=7.2.0|>=9.3.0']
matplotlib -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
gmsh -> libstdcxx-ng[version='>=10.3.0|>=12|>=9.4.0|>=9.3.0|>=7.5.0|>=7.3.0']
gmsh -> libglu -> libstdcxx-ng[version='>=4.9|>=7.2.0']
pysparse -> numpy[version='>=1.9.3,<2.0a0'] -> libstdcxx-ng[version='>=10.3.0|>=12|>=9.4.0|>=7.3.0|>=4.9|>=11.2.0|>=7.5.0|>=7.2.0']
scipy -> libstdcxx-ng[version='>=10.3.0|>=12|>=9.4.0|>=9.3.0|>=7.5.0|>=7.3.0|>=4.9|>=11.2.0|>=7.2.0']
numpy -> libstdcxx-ng[version='>=10.3.0|>=12|>=9.4.0|>=7.3.0|>=4.9|>=11.2.0|>=7.5.0']
python=3 -> libstdcxx-ng[version='>=11.2.0|>=4.9|>=7.3.0|>=7.5.0|>=9.3.0|>=9.4.0|>=7.2.0']
matplotlib -> matplotlib-base[version='>=3.6.0,<3.6.1.0a0'] -> libstdcxx-ng[version='>=10.3.0|>=12|>=7.5.0|>=4.9|>=11.2.0|>=9.3.0|>=9.4.0']
fipy -> matplotlib-base -> libstdcxx-ng[version='>=10.3.0|>=12|>=9.4.0|>=9.3.0|>=7.5.0|>=7.3.0|>=11.2.0|>=4.9|>=7.2.0']

Package python conflicts for:
pysparse -> numpy[version='>=1.9.3,<2.0a0'] -> python[version='2.7.*|3.5.*|3.6.*|>=3.10,<3.11.0a0|>=3.8,<3.9.0a0|>=3.9,<3.10.0a0|>=3.7,<3.8.0a0|>=3.6,<3.7.0a0|>=3.5,<3.6.0a0|3.4.*']
scipy -> python[version='2.7.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.10,<3.11.0a0|>=3.8,<3.9.0a0|>=3.9,<3.10.0a0|>=3.7,<3.8.0a0|>=3.6,<3.7.0a0|>=3.5,<3.6.0a0|3.4.*']
python=3
numpy -> python_abi=3.8[build=*_cp38] -> python[version='3.10.*|3.8.*|3.9.*|3.7.*']
fipy -> future -> python[version='2.7.*|3.4.*|3.5.*|3.6.*|>=3.5,<3.6.0a0|>=3.6|>=2.7|3.7.*|3.10.*|3.8.*|3.9.*']
numpy -> python[version='2.7.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.10,<3.11.0a0|>=3.8,<3.9.0a0|>=3.9,<3.10.0a0|>=3.7,<3.8.0a0|>=3.6,<3.7.0a0|>=3.5,<3.6.0a0|3.4.*']
scipy -> python_abi=3.8[build=*_cp38] -> python[version='3.10.*|3.8.*|3.9.*|3.7.*']
matplotlib -> pyqt -> python[version='3.10.*|3.6.*|3.9.*|3.8.*|3.7.*|>=3.6|>=3.0,<=3.9|>=3|>=3.8|<3']
matplotlib -> python[version='2.7.*|3.4.*|3.5.*|>=2.7,<2.8.0a0|>=3.10,<3.11.0a0|>=3.9,<3.10.0a0|>=3.8,<3.9.0a0|>=3.7,<3.8.0a0|>=3.6,<3.7.0a0|>=3.5,<3.6.0a0']
fipy -> python[version='>=2.7,<2.8.0a0|>=3.10,<3.11.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0|>=3.9,<3.10.0a0|>=3.6,<3.7.0a0']
pysparse -> python[version='>=2.7,<2.8.0a0'] 

Now conda activate FIPY gives me现在conda activate FIPY给了我

Could not find conda environment: FIPY
You can list all discoverable environments with `conda info --envs`.

Is it better to create an environment with python 2.7 for fipy?使用 python 2.7 为 fipy 创建一个环境会更好吗? Thanks in advance!提前致谢!

----------------- EDIT ----------------- - - - - - - - - - 编辑 - - - - - - - - -

Apart from the answer posted by jaguyer , it seems the anaconda prescribed way of installing fipy also works out (at least in my case - ubuntu 16.04, python 3.x in conda base).除了jaguyer发布的答案之外,似乎anaconda 规定的安装 fipy 的方法也有效(至少在我的情况下 - ubuntu 16.04,conda 基础中的 Z23EEEB4347BDD26BFC6B7EE9A3B755)。 I will write the steps here:我将在这里写下步骤:

  1. Create a new environment by conda create -n <environment name> eg, conda create -n fipy通过conda create -n <environment name>创建一个新环境,例如conda create -n fipy
  2. Activate the environment by conda activate fipy通过conda activate fipy激活环境
  3. Install fipy in the new env from conda-forge conda install -c conda-forge fipy从 conda-forge 在新环境中安装 fipy conda conda install -c conda-forge fipy

Just entering conda install -c conda-forge fipy in the anaconda base environment did not work for me resulting in: Solving environment: | Found conflicts. Looking for incompatible packages.在 anaconda 基本环境中输入conda install -c conda-forge fipy fipy 对我不起作用,导致: Solving environment: | Found conflicts. Looking for incompatible packages. Solving environment: | Found conflicts. Looking for incompatible packages. Hope this helps!希望这可以帮助!

Per the link you posted, FiPy should be installed with根据您发布的链接,应安装 FiPy

conda create --name <MYFIPYENV> --channel conda-forge python=<PYTHONVERSION> fipy gmsh

Everything else on that page are for various edge cases.该页面上的所有其他内容都适用于各种边缘情况。 The particular combination of packages you posted are for Windows and, in fact, include a typo.您发布的软件包的特定组合是针对 Windows 的,实际上包括一个错字。 Pysparse is not compatible with Python 3. Pysparse 与 Python 3 不兼容。

It is not better to create an environment with Python 2.7.使用 Python 2.7 创建环境并不好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM