首先,确认是否已安装sqlite3, 如下说明已安装,
[pyengine@localhost PyVenv]$ whereis sqlite3
sqlite3: /usr/bin/sqlite3 /usr/include/sqlite3.h /usr/share/man/man1/sqlite3.1.gz
若未安装sqlite3,则使用以下命令安装:
sudo yum install sqlite-devel
创建python虚拟环境,
python3 -m venv pyCycle
激活虚拟环境,
source /home/pyengine/PyEnvs/pyCycle/bin/activate
升级pip,
pip install --upgrade pip
安装openmdao,
pip install openmdao
安装pyCycle,
pip install om-pycycle
若在安装sqlite3前已安装python和虚拟环境,需在安装sqlite3后,需重新编译安装python,重新建立虚拟环境。
首先使用以下命令在联网计算机上下载安装包和依赖库,
pip download openmdao -d /home/pyengine/openmdao
过程如下,
Collecting openmdao
Using cached openmdao-3.15.0.tar.gz (5.2 MB)
Preparing metadata (setup.py) ... done
Collecting networkx>=2.0
Using cached networkx-2.5.1-py3-none-any.whl (1.6 MB)
Collecting numpy
Using cached numpy-1.19.5-cp36-cp36m-manylinux2010_x86_64.whl (14.8 MB)
Collecting pyDOE2
Using cached pyDOE2-1.3.0.tar.gz (19 kB)
Preparing metadata (setup.py) ... done
Collecting pyparsing
Using cached pyparsing-3.0.7-py3-none-any.whl (98 kB)
Collecting scipy
Using cached scipy-1.5.4-cp36-cp36m-manylinux1_x86_64.whl (25.9 MB)
Collecting requests
Using cached requests-2.27.1-py2.py3-none-any.whl (63 kB)
Collecting decorator<5,>=4.3
Using cached decorator-4.4.2-py2.py3-none-any.whl (9.2 kB)
Collecting urllib3<1.27,>=1.21.1
Using cached urllib3-1.26.9-py2.py3-none-any.whl (138 kB)
Collecting idna<4,>=2.5
Using cached idna-3.3-py3-none-any.whl (61 kB)
Collecting charset-normalizer~=2.0.0
Using cached charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
Collecting certifi>=2017.4.17
Using cached certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
Saved /home/pyengine/openmdao/openmdao-3.15.0.tar.gz
Saved /home/pyengine/openmdao/networkx-2.5.1-py3-none-any.whl
Saved /home/pyengine/openmdao/numpy-1.19.5-cp36-cp36m-manylinux2010_x86_64.whl
Saved /home/pyengine/openmdao/pyDOE2-1.3.0.tar.gz
Saved /home/pyengine/openmdao/pyparsing-3.0.7-py3-none-any.whl
Saved /home/pyengine/openmdao/requests-2.27.1-py2.py3-none-any.whl
Saved /home/pyengine/openmdao/scipy-1.5.4-cp36-cp36m-manylinux1_x86_64.whl
Saved /home/pyengine/openmdao/certifi-2021.10.8-py2.py3-none-any.whl
Saved /home/pyengine/openmdao/charset_normalizer-2.0.12-py3-none-any.whl
Saved /home/pyengine/openmdao/decorator-4.4.2-py2.py3-none-any.whl
Saved /home/pyengine/openmdao/idna-3.3-py3-none-any.whl
Saved /home/pyengine/openmdao/urllib3-1.26.9-py2.py3-none-any.whl
Successfully downloaded openmdao networkx numpy pyDOE2 pyparsing requests scipy certifi charset-normalizer decorator idna urllib3
采用上述方式可以下载pyCycle的安装包以及依赖库,同时可选择设置版本号,
pip download om-pycycle==4.2.1 -d /home/pyengine/pycycle
最后,可在离线安装已下载好的whl文件。
上一篇:【已解决】将CentOS7系统安装至U盘(十一):安装MySQL-8.0.28
下一篇:【已解决】将CentOS7系统安装至U盘(十三):VS Code配置Python虚拟环境
。