将 getfem++ 导入 conda 环境? - Raspberry Pi 4 - Ubuntu 21.04
Import getfem++ into conda environnement ? - Raspberry Pi 4 - Ubuntu 21.04
在我的项目中,我使用 Raspberry PI 4 安装了 Ubuntu 21.04 (aarch64)。
我正在使用:
-Pycharm 作为我的 IDE 为 Python
-Miniforge3 拥有 conda 环境
我想安装库 getfem++ and pyvista 到 运行 这个例子:
https://getfem-examples.readthedocs.io/en/latest/demo_unit_disk.html
1) GETFEM++
我已经使用命令 sudo aptitude install python3-getfem++
安装了 getfem++ --> 它有效
2) Pyvista
-With pip install pyvista
: 错误,似乎与我安装失败的 vtk 存在依赖关系。
pip install pyvista
Collecting pyvista
Using cached pyvista-0.30.1-py3-none-any.whl (1.2 MB)
Collecting appdirs
Using cached appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
Collecting scooby>=0.5.1
Using cached scooby-0.5.7-py3-none-any.whl (13 kB)
Collecting meshio<5.0,>=4.0.3
Using cached meshio-4.4.3-py3-none-any.whl (153 kB)
Requirement already satisfied: imageio in ./.local/lib/python3.9/site-packages (from pyvista) (2.9.0)
Requirement already satisfied: pillow in /usr/lib/python3/dist-packages (from pyvista) (8.1.2)
Collecting pyvista
Using cached pyvista-0.30.0-py3-none-any.whl (1.2 MB)
Using cached pyvista-0.29.1-py3-none-any.whl (1.2 MB)
Using cached pyvista-0.29.0-py3-none-any.whl (1.2 MB)
Using cached pyvista-0.28.1-py3-none-any.whl (1.2 MB)
Using cached pyvista-0.28.0-py3-none-any.whl (1.2 MB)
Using cached pyvista-0.27.4-py3-none-any.whl (1.2 MB)
Using cached pyvista-0.27.3-py3-none-any.whl (1.2 MB)
Using cached pyvista-0.27.2-py3-none-any.whl (1.2 MB)
Using cached pyvista-0.27.1-py3-none-any.whl (1.2 MB)
Using cached pyvista-0.27.0-py3-none-any.whl (1.2 MB)
Using cached pyvista-0.26.1-py3-none-any.whl (1.2 MB)
Using cached pyvista-0.26.0-py3-none-any.whl (1.2 MB)
Using cached pyvista-0.25.3-py3-none-any.whl (1.2 MB)
Using cached pyvista-0.25.2-py3-none-any.whl (1.2 MB)
Using cached pyvista-0.25.1.tar.gz (1.2 MB)
Requirement already satisfied: numpy in ./.local/lib/python3.9/site-packages (from pyvista) (1.20.3)
Using cached pyvista-0.24.3.tar.gz (1.2 MB)
Using cached pyvista-0.24.2.tar.gz (1.2 MB)
Using cached pyvista-0.24.1.tar.gz (1.2 MB)
Using cached pyvista-0.24.0.tar.gz (1.2 MB)
Using cached pyvista-0.23.1.tar.gz (1.2 MB)
Using cached pyvista-0.23.0.tar.gz (1.2 MB)
Using cached pyvista-0.22.4.tar.gz (1.2 MB)
Using cached pyvista-0.22.2.tar.gz (1.2 MB)
Using cached pyvista-0.22.1.tar.gz (1.2 MB)
Using cached pyvista-0.22.0.tar.gz (1.2 MB)
Using cached pyvista-0.21.4.tar.gz (1.1 MB)
Using cached pyvista-0.21.3.tar.gz (1.1 MB)
Using cached pyvista-0.21.2.tar.gz (1.1 MB)
Using cached pyvista-0.21.1.tar.gz (1.1 MB)
Using cached pyvista-0.21.0.tar.gz (1.1 MB)
Using cached pyvista-0.20.4.tar.gz (1.1 MB)
Using cached pyvista-0.20.3.tar.gz (1.1 MB)
Using cached pyvista-0.20.2.tar.gz (1.1 MB)
Using cached pyvista-0.20.1.tar.gz (1.1 MB)
Using cached pyvista-0.20.0.tar.gz (1.1 MB)
ERROR: Cannot install pyvista==0.20.0, pyvista==0.20.1, pyvista==0.20.2, pyvista==0.20.3, pyvista==0.20.4, pyvista==0.21.0, pyvista==0.21.1, pyvista==0.21.2, pyvista==0.21.3, pyvista==0.21.4, pyvista==0.22.0, pyvista==0.22.1, pyvista==0.22.2, pyvista==0.22.4, pyvista==0.23.0, pyvista==0.23.1, pyvista==0.24.0, pyvista==0.24.1, pyvista==0.24.2, pyvista==0.24.3, pyvista==0.25.1, pyvista==0.25.2, pyvista==0.25.3, pyvista==0.26.0, pyvista==0.26.1, pyvista==0.27.0, pyvista==0.27.1, pyvista==0.27.2, pyvista==0.27.3, pyvista==0.27.4, pyvista==0.28.0, pyvista==0.28.1, pyvista==0.29.0, pyvista==0.29.1, pyvista==0.30.0 and pyvista==0.30.1 because these package versions have conflicting dependencies.
The conflict is caused by:
pyvista 0.30.1 depends on vtk
pyvista 0.30.0 depends on vtk
pyvista 0.29.1 depends on vtk
pyvista 0.29.0 depends on vtk
pyvista 0.28.1 depends on vtk
pyvista 0.28.0 depends on vtk
pyvista 0.27.4 depends on vtk
pyvista 0.27.3 depends on vtk
pyvista 0.27.2 depends on vtk
pyvista 0.27.1 depends on vtk
pyvista 0.27.0 depends on vtk
pyvista 0.26.1 depends on vtk
pyvista 0.26.0 depends on vtk
pyvista 0.25.3 depends on vtk
pyvista 0.25.2 depends on vtk
pyvista 0.25.1 depends on vtk
pyvista 0.24.3 depends on vtk
pyvista 0.24.2 depends on vtk
pyvista 0.24.1 depends on vtk
pyvista 0.24.0 depends on vtk
pyvista 0.23.1 depends on vtk
pyvista 0.23.0 depends on vtk
pyvista 0.22.4 depends on vtk
pyvista 0.22.2 depends on vtk
pyvista 0.22.1 depends on vtk
pyvista 0.22.0 depends on vtk
pyvista 0.21.4 depends on vtk
pyvista 0.21.3 depends on vtk
pyvista 0.21.2 depends on vtk
pyvista 0.21.1 depends on vtk
pyvista 0.21.0 depends on vtk
pyvista 0.20.4 depends on vtk
pyvista 0.20.3 depends on vtk
pyvista 0.20.2 depends on vtk
pyvista 0.20.1 depends on vtk
pyvista 0.20.0 depends on vtk
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
-使用 conda 环境(来自 miniforge3):pyvista 可以毫无困难地安装。
此时我在问自己是否可以使用 conda 环境并在 Pycharm 中添加 getfem++ 库的路径?
我在 /home/alban/miniforge3/envs/Conda_PY39/lib/python3.9/site-packages
中用 :
创建了一个 .pth 文件
/usr/lib/python3.9/dist-packages
/usr/lib/python3/dist-packages
/lib/python3/dist-packages
/lib/python3.9/dist-packages
有了这个,我似乎检测到了“getfem”和“pyvista”,但我得到了这个错误:
/home/alban/miniforge3/envs/Conda_PY39/bin/python /home/alban/PycharmProjects/pythonProject/main.py
Traceback (most recent call last):
File "/home/alban/PycharmProjects/pythonProject/main.py", line 1, in <module>
import getfem as gf
File "/usr/lib/python3/dist-packages/getfem/__init__.py", line 16, in <module>
from .getfem import *
File "/usr/lib/python3/dist-packages/getfem/getfem.py", line 44, in <module>
from ._getfem import *
ImportError: /home/alban/miniforge3/envs/Conda_PY39/bin/../lib/libgfortran.so.5: version `GFORTRAN_10' not found (required by /lib/aarch64-linux-gnu/libdmumps_seq-5.3.so)
Process finished with exit code 1
我真的不知道还有什么建议可以尝试?
我在 Rpi4 上成功安装了 getfem++ 和 pyvista(没有 conda)。
我在本文末尾发布了我的方法github discussion
希望对您有所帮助!
我采取的步骤的简要列表(在链接的讨论中有详细信息):
- 已安装 Ubuntu 20.04 以获得 Python 3.8.6.
- 使用 apt
安装 python3-getfem++
- 从源代码构建 vtk,因为 Rpi4 使用的 arm64 架构没有轮子
- 使用
--no-dependencies
开关安装 PyVista 以使用手动安装的依赖项
- 手动安装 PyVista 的其他依赖项(使用 PC 和 pip 将 pyvista 安装到新的 virtualenv 中可以帮助收集依赖项,如果不想去 PyVista 的
setup.py
中寻找依赖项的话)
- 安装软件包(尤其是
xvfb
)以获得用于绘图的虚拟帧缓冲区。
在我的项目中,我使用 Raspberry PI 4 安装了 Ubuntu 21.04 (aarch64)。
我正在使用:
-Pycharm 作为我的 IDE 为 Python
-Miniforge3 拥有 conda 环境
我想安装库 getfem++ and pyvista 到 运行 这个例子: https://getfem-examples.readthedocs.io/en/latest/demo_unit_disk.html
1) GETFEM++
我已经使用命令 sudo aptitude install python3-getfem++
安装了 getfem++ --> 它有效
2) Pyvista
-With pip install pyvista
: 错误,似乎与我安装失败的 vtk 存在依赖关系。
pip install pyvista
Collecting pyvista
Using cached pyvista-0.30.1-py3-none-any.whl (1.2 MB)
Collecting appdirs
Using cached appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
Collecting scooby>=0.5.1
Using cached scooby-0.5.7-py3-none-any.whl (13 kB)
Collecting meshio<5.0,>=4.0.3
Using cached meshio-4.4.3-py3-none-any.whl (153 kB)
Requirement already satisfied: imageio in ./.local/lib/python3.9/site-packages (from pyvista) (2.9.0)
Requirement already satisfied: pillow in /usr/lib/python3/dist-packages (from pyvista) (8.1.2)
Collecting pyvista
Using cached pyvista-0.30.0-py3-none-any.whl (1.2 MB)
Using cached pyvista-0.29.1-py3-none-any.whl (1.2 MB)
Using cached pyvista-0.29.0-py3-none-any.whl (1.2 MB)
Using cached pyvista-0.28.1-py3-none-any.whl (1.2 MB)
Using cached pyvista-0.28.0-py3-none-any.whl (1.2 MB)
Using cached pyvista-0.27.4-py3-none-any.whl (1.2 MB)
Using cached pyvista-0.27.3-py3-none-any.whl (1.2 MB)
Using cached pyvista-0.27.2-py3-none-any.whl (1.2 MB)
Using cached pyvista-0.27.1-py3-none-any.whl (1.2 MB)
Using cached pyvista-0.27.0-py3-none-any.whl (1.2 MB)
Using cached pyvista-0.26.1-py3-none-any.whl (1.2 MB)
Using cached pyvista-0.26.0-py3-none-any.whl (1.2 MB)
Using cached pyvista-0.25.3-py3-none-any.whl (1.2 MB)
Using cached pyvista-0.25.2-py3-none-any.whl (1.2 MB)
Using cached pyvista-0.25.1.tar.gz (1.2 MB)
Requirement already satisfied: numpy in ./.local/lib/python3.9/site-packages (from pyvista) (1.20.3)
Using cached pyvista-0.24.3.tar.gz (1.2 MB)
Using cached pyvista-0.24.2.tar.gz (1.2 MB)
Using cached pyvista-0.24.1.tar.gz (1.2 MB)
Using cached pyvista-0.24.0.tar.gz (1.2 MB)
Using cached pyvista-0.23.1.tar.gz (1.2 MB)
Using cached pyvista-0.23.0.tar.gz (1.2 MB)
Using cached pyvista-0.22.4.tar.gz (1.2 MB)
Using cached pyvista-0.22.2.tar.gz (1.2 MB)
Using cached pyvista-0.22.1.tar.gz (1.2 MB)
Using cached pyvista-0.22.0.tar.gz (1.2 MB)
Using cached pyvista-0.21.4.tar.gz (1.1 MB)
Using cached pyvista-0.21.3.tar.gz (1.1 MB)
Using cached pyvista-0.21.2.tar.gz (1.1 MB)
Using cached pyvista-0.21.1.tar.gz (1.1 MB)
Using cached pyvista-0.21.0.tar.gz (1.1 MB)
Using cached pyvista-0.20.4.tar.gz (1.1 MB)
Using cached pyvista-0.20.3.tar.gz (1.1 MB)
Using cached pyvista-0.20.2.tar.gz (1.1 MB)
Using cached pyvista-0.20.1.tar.gz (1.1 MB)
Using cached pyvista-0.20.0.tar.gz (1.1 MB)
ERROR: Cannot install pyvista==0.20.0, pyvista==0.20.1, pyvista==0.20.2, pyvista==0.20.3, pyvista==0.20.4, pyvista==0.21.0, pyvista==0.21.1, pyvista==0.21.2, pyvista==0.21.3, pyvista==0.21.4, pyvista==0.22.0, pyvista==0.22.1, pyvista==0.22.2, pyvista==0.22.4, pyvista==0.23.0, pyvista==0.23.1, pyvista==0.24.0, pyvista==0.24.1, pyvista==0.24.2, pyvista==0.24.3, pyvista==0.25.1, pyvista==0.25.2, pyvista==0.25.3, pyvista==0.26.0, pyvista==0.26.1, pyvista==0.27.0, pyvista==0.27.1, pyvista==0.27.2, pyvista==0.27.3, pyvista==0.27.4, pyvista==0.28.0, pyvista==0.28.1, pyvista==0.29.0, pyvista==0.29.1, pyvista==0.30.0 and pyvista==0.30.1 because these package versions have conflicting dependencies.
The conflict is caused by:
pyvista 0.30.1 depends on vtk
pyvista 0.30.0 depends on vtk
pyvista 0.29.1 depends on vtk
pyvista 0.29.0 depends on vtk
pyvista 0.28.1 depends on vtk
pyvista 0.28.0 depends on vtk
pyvista 0.27.4 depends on vtk
pyvista 0.27.3 depends on vtk
pyvista 0.27.2 depends on vtk
pyvista 0.27.1 depends on vtk
pyvista 0.27.0 depends on vtk
pyvista 0.26.1 depends on vtk
pyvista 0.26.0 depends on vtk
pyvista 0.25.3 depends on vtk
pyvista 0.25.2 depends on vtk
pyvista 0.25.1 depends on vtk
pyvista 0.24.3 depends on vtk
pyvista 0.24.2 depends on vtk
pyvista 0.24.1 depends on vtk
pyvista 0.24.0 depends on vtk
pyvista 0.23.1 depends on vtk
pyvista 0.23.0 depends on vtk
pyvista 0.22.4 depends on vtk
pyvista 0.22.2 depends on vtk
pyvista 0.22.1 depends on vtk
pyvista 0.22.0 depends on vtk
pyvista 0.21.4 depends on vtk
pyvista 0.21.3 depends on vtk
pyvista 0.21.2 depends on vtk
pyvista 0.21.1 depends on vtk
pyvista 0.21.0 depends on vtk
pyvista 0.20.4 depends on vtk
pyvista 0.20.3 depends on vtk
pyvista 0.20.2 depends on vtk
pyvista 0.20.1 depends on vtk
pyvista 0.20.0 depends on vtk
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
-使用 conda 环境(来自 miniforge3):pyvista 可以毫无困难地安装。
此时我在问自己是否可以使用 conda 环境并在 Pycharm 中添加 getfem++ 库的路径?
我在 /home/alban/miniforge3/envs/Conda_PY39/lib/python3.9/site-packages
中用 :
/usr/lib/python3.9/dist-packages
/usr/lib/python3/dist-packages
/lib/python3/dist-packages
/lib/python3.9/dist-packages
有了这个,我似乎检测到了“getfem”和“pyvista”,但我得到了这个错误:
/home/alban/miniforge3/envs/Conda_PY39/bin/python /home/alban/PycharmProjects/pythonProject/main.py
Traceback (most recent call last):
File "/home/alban/PycharmProjects/pythonProject/main.py", line 1, in <module>
import getfem as gf
File "/usr/lib/python3/dist-packages/getfem/__init__.py", line 16, in <module>
from .getfem import *
File "/usr/lib/python3/dist-packages/getfem/getfem.py", line 44, in <module>
from ._getfem import *
ImportError: /home/alban/miniforge3/envs/Conda_PY39/bin/../lib/libgfortran.so.5: version `GFORTRAN_10' not found (required by /lib/aarch64-linux-gnu/libdmumps_seq-5.3.so)
Process finished with exit code 1
我真的不知道还有什么建议可以尝试?
我在 Rpi4 上成功安装了 getfem++ 和 pyvista(没有 conda)。
我在本文末尾发布了我的方法github discussion
希望对您有所帮助!
我采取的步骤的简要列表(在链接的讨论中有详细信息):
- 已安装 Ubuntu 20.04 以获得 Python 3.8.6.
- 使用 apt 安装
- 从源代码构建 vtk,因为 Rpi4 使用的 arm64 架构没有轮子
- 使用
--no-dependencies
开关安装 PyVista 以使用手动安装的依赖项 - 手动安装 PyVista 的其他依赖项(使用 PC 和 pip 将 pyvista 安装到新的 virtualenv 中可以帮助收集依赖项,如果不想去 PyVista 的
setup.py
中寻找依赖项的话) - 安装软件包(尤其是
xvfb
)以获得用于绘图的虚拟帧缓冲区。
python3-getfem++