使用hls4ml将python代码转换为HDL

2024-10-03 09:20:06 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在学习本教程:https://fastmachinelearning.org/hls4ml/setup/QUICKSTART.html 当我发出命令时:

root@ubuntu:~/Desktop/vivado/hls4ml/example-models$ hls4ml convert -c keras-config.yml
hls4ml: command not found

我该怎么办?我试过了

pip install hls4ml

我明白了:

WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: hls4ml in /home/mojito/.local/lib/python2.7/site-packages (0.2.0)
Requirement already satisfied: numpy in /home/mojito/.local/lib/python2.7/site-packages (from hls4ml) (1.16.6)
Requirement already satisfied: six in /home/mojito/.local/lib/python2.7/site-packages (from hls4ml) (1.14.0)
Requirement already satisfied: pyyaml in /home/mojito/.local/lib/python2.7/site-packages (from hls4ml) (5.3.1)
Requirement already satisfied: h5py in /home/mojito/.local/lib/python2.7/site-packages (from hls4ml) (2.10.0)
Requirement already satisfied: onnx>=1.4.0 in /home/mojito/.local/lib/python2.7/site-packages (from hls4ml) (1.6.0)
Requirement already satisfied: typing>=3.6.4; python_version < "3.5" in /home/mojito/.local/lib/python2.7/site-packages (from onnx>=1.4.0->hls4ml) (3.7.4.1)
Requirement already satisfied: protobuf in /home/mojito/.local/lib/python2.7/site-packages (from onnx>=1.4.0->hls4ml) (3.11.3)
Requirement already satisfied: typing-extensions>=3.6.2.1 in /home/mojito/.local/lib/python2.7/site-packages (from onnx>=1.4.0->hls4ml) (3.7.4.1)
Requirement already satisfied: setuptools in /home/mojito/.local/lib/python2.7/site-packages (from protobuf->onnx>=1.4.0->hls4ml) (44.1.0)

Tags: pipofinfromhomelibpackageslocal