安装nnpy出现错误以及解决

news2025/7/13 21:49:51

今天在安装P4C的时候,参考了这篇博客
P4语言环境安装-前端编译器p4c、后端编译器p4c-bm2-ss、交换模型bmv2、Tutorial-张华Guido

在进行到这一步时,出现了错误

#安装python-pip
sudo apt install python-pip
#我是安装在/home/guido(user_name)/路径下
git clone https://github.com/nanomsg/nnpy
#进入nnpy文件夹
cd /home/guido/nnpy
#安装nnpy
pip install nnpy	

在这里插入图片描述
属于SSL Retry错误,CERTIFICATE ERROR,参考了这篇博客-----完美解决 Could not find a version that satisfies the requirement 安装包名字 (from versions: )–戴国进
的做法,将最后一句改为

pip install nnpy -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

这样做之后,结果仍然出现错误

ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8xDyxr/nnpy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8xDyxr/nnpy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-3btyVq
         cwd: /tmp/pip-install-8xDyxr/nnpy/
    Complete output (25 lines):
    Download error on https://pypi.python.org/simple/cffi/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727) -- Some packages may not be found!
    Couldn't find index page for 'cffi' (maybe misspelled?)
    Download error on https://pypi.python.org/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727) -- Some packages may not be found!
    No local packages or working download links found for cffi>=1.0.0
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-8xDyxr/nnpy/setup.py", line 28, in <module>
        install_requires=['cffi'],
      File "/usr/lib/python2.7/dist-packages/setuptools/__init__.py", line 128, in setup
        _install_setup_requires(attrs)
      File "/usr/lib/python2.7/dist-packages/setuptools/__init__.py", line 123, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 513, in fetch_build_eggs
        replace_conflicting=True,
      File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 774, in resolve
        replace_conflicting=replace_conflicting
      File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1057, in best_match
        return self.obtain(req, installer)
      File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1069, in obtain
        return installer(requirement)
      File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 580, in fetch_build_egg
        return cmd.easy_install(req)
      File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 692, in easy_install
        raise DistutilsError(msg)
    distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('cffi>=1.0.0')
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

然后暂时放在一边不管了。。。。。

之后在安装p4c的这一步make check时,
在这里插入图片描述
一些例子make check不过

The following tests FAILED:
	 63 - ebpf-bcc/testdata/p4_16_samples/action_call_ebpf.p4 (Failed)
	 64 - ebpf-bcc/testdata/p4_16_samples/action_call_table_ebpf.p4 (Failed)
	 65 - ebpf-bcc/testdata/p4_16_samples/bool_ebpf.p4 (Failed)
	 66 - ebpf-bcc/testdata/p4_16_samples/count_add_ebpf.p4 (Failed)
	 67 - ebpf-bcc/testdata/p4_16_samples/count_ebpf.p4 (Failed)
	 68 - ebpf-bcc/testdata/p4_16_samples/hit_ebpf.p4 (Failed)
	 69 - ebpf-bcc/testdata/p4_16_samples/init_ebpf.p4 (Failed)
	 70 - ebpf-bcc/testdata/p4_16_samples/issue2791_ebpf.p4 (Failed)
	 71 - ebpf-bcc/testdata/p4_16_samples/issue2793_ebpf.p4 (Failed)
	 72 - ebpf-bcc/testdata/p4_16_samples/issue2797_ebpf.p4 (Failed)
	 73 - ebpf-bcc/testdata/p4_16_samples/issue870_ebpf.p4 (Failed)
	 74 - ebpf-bcc/testdata/p4_16_samples/key-issue-1020_ebpf.p4 (Failed)
	 75 - ebpf-bcc/testdata/p4_16_samples/key_ebpf.p4 (Failed)
	 76 - ebpf-bcc/testdata/p4_16_samples/lpm_ebpf.p4 (Failed)
	 77 - ebpf-bcc/testdata/p4_16_samples/stack_ebpf.p4 (Failed)
	 78 - ebpf-bcc/testdata/p4_16_samples/switch_ebpf.p4 (Failed)
	 79 - ebpf-bcc/testdata/p4_16_samples/test_ebpf.p4 (Failed)
	 80 - ebpf-bcc/testdata/p4_16_samples/two_ebpf.p4 (Failed)
	 81 - ebpf-bcc/testdata/p4_16_samples/valid_ebpf.p4 (Failed)
	 82 - ebpf/testdata/p4_16_samples/action_call_ebpf.p4 (Failed)
	 83 - ebpf/testdata/p4_16_samples/action_call_table_ebpf.p4 (Failed)
	 84 - ebpf/testdata/p4_16_samples/bool_ebpf.p4 (Failed)
	 85 - ebpf/testdata/p4_16_samples/count_add_ebpf.p4 (Failed)
	 86 - ebpf/testdata/p4_16_samples/count_ebpf.p4 (Failed)
	 87 - ebpf/testdata/p4_16_samples/hit_ebpf.p4 (Failed)
	 88 - ebpf/testdata/p4_16_samples/init_ebpf.p4 (Failed)
	 89 - ebpf/testdata/p4_16_samples/issue2791_ebpf.p4 (Failed)
	 90 - ebpf/testdata/p4_16_samples/issue2793_ebpf.p4 (Failed)
	 91 - ebpf/testdata/p4_16_samples/issue2797_ebpf.p4 (Failed)
	 92 - ebpf/testdata/p4_16_samples/issue870_ebpf.p4 (Failed)
	 93 - ebpf/testdata/p4_16_samples/key-issue-1020_ebpf.p4 (Failed)
	 94 - ebpf/testdata/p4_16_samples/key_ebpf.p4 (Failed)
	 96 - ebpf/testdata/p4_16_samples/stack_ebpf.p4 (Failed)
	 97 - ebpf/testdata/p4_16_samples/switch_ebpf.p4 (Failed)
	 98 - ebpf/testdata/p4_16_samples/test_ebpf.p4 (Failed)
	 99 - ebpf/testdata/p4_16_samples/two_ebpf.p4 (Failed)
	100 - ebpf/testdata/p4_16_samples/valid_ebpf.p4 (Failed)
	101 - ebpf/testdata/p4_16_samples/ebpf_checksum_extern.p4 (Failed)
	103 - ubpf/testdata/p4_16_samples/action_call_ubpf.p4 (Failed)
	104 - ubpf/testdata/p4_16_samples/action_fwd_ubpf.p4 (Failed)
	105 - ubpf/testdata/p4_16_samples/advance_ubpf.p4 (Failed)
	106 - ubpf/testdata/p4_16_samples/csum_ubpf.p4 (Failed)
	107 - ubpf/testdata/p4_16_samples/default_action_ubpf.p4 (Failed)
	108 - ubpf/testdata/p4_16_samples/hash_ubpf.p4 (Failed)
	109 - ubpf/testdata/p4_16_samples/ipv4-actions_ubpf.p4 (Failed)
	110 - ubpf/testdata/p4_16_samples/ipv6-actions_ubpf.p4 (Failed)
	111 - ubpf/testdata/p4_16_samples/lookahead_ubpf.p4 (Failed)
	112 - ubpf/testdata/p4_16_samples/lpm_ubpf.p4 (Failed)
	113 - ubpf/testdata/p4_16_samples/metadata_ubpf.p4 (Failed)
	114 - ubpf/testdata/p4_16_samples/parenthesis-test_ubpf.p4 (Failed)
	115 - ubpf/testdata/p4_16_samples/simple-actions_ubpf.p4 (Failed)
	116 - ubpf/testdata/p4_16_samples/simple-firewall_ubpf.p4 (Failed)
	117 - ubpf/testdata/p4_16_samples/truncate_ubpf.p4 (Failed)
	118 - ubpf/testdata/p4_16_samples/tunneling_ubpf.p4 (Failed)
	119 - ubpf/testdata/p4_16_samples/ubpf_hash_extern.p4 (Failed)
	120 - ubpf/testdata/p4_16_samples/ubpf_checksum_extern.p4 (Failed)

关于这个错误,参考了这篇文章中的说法:Ubuntu16.04中配置p4编程环境(二)–Chin
在这里插入图片描述

是由于依赖问题导致的make check错误

想了一下,将需要sudo apt install 的包都安了一遍,仍然没有变化,最后想到了之前pip install nnpy未通过的问题,所以接下来要解决这个nnpy的问题:
从帮助信息可以知道nnpy依赖的包是cffi,所以是不是cffi的错误呢?
我参考了这篇文章cffi python包版本不匹配时出错
升级了cffi包

pip install --upgrade cffi==1.14.6 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

在这里插入图片描述
然后再执行nnpy的安装

pip install nnpy -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

这样之后,nnpy就安装好了

然后回到p4c的make check问题,重新执行,结果如下,问题解决了,果然是依赖的问题且问题应该出在nnpy的安装上
在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/108924.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

阿里云斩获2022全球分布式云大会两项大奖

12 月 21日&#xff0c;“2022 全球分布式云大会深圳站”正式举办。阿里云弹性计算团队凭借在算力领域的创新突破与全面的分布式云产品矩阵布局&#xff0c;荣获“2022 年度中国算力先锋 TOP3”、“2022 年度分布式算力市场领导力企业”两项大奖。 图一&#xff1a;2022年度中国…

智能勘探 | AIRIOT智慧油田管理解决方案

石油勘探和开采地处偏远地区&#xff0c;涉及面广且生产规模大。特殊的作业环境下&#xff0c;使得工作人员作业条件艰苦&#xff0c;仅靠人工值守难度很大&#xff0c;不可避免的遇到一系列硬核挑战&#xff1a; 1、设备维护难度较高&#xff1b; 2、采油厂分布地域广、分散…

北面羽绒服成热议产品,小红书透露出哪些营销新趋势?

小红书浓厚的种草氛围&#xff0c;为品牌创造了良好的营销环境&#xff0c;想要在小红书做好内容种草&#xff0c;需要洞察用户的真实需求来推广产品&#xff0c;实现营销效果的最大化。那如何发现小红书上的热门品类&#xff1f;制定品牌营销策略&#xff1f;挑选优质合作达人…

面试题题review

面试题 已知一个几乎有序的数组&#xff0c;几乎有序是指&#xff0c;如果把数组排好顺序的话&#xff0c;每个元素移动的距离可以不超过k&#xff0c;并且k相对于数组来说比较小。请选择一个合适的排序算法针对这个数据进行排序。给定一个int数组A&#xff0c;同时给定A的大小…

多准则决策问题评估方法 | 层次分析法(含代码)

目前多准则决策问题的评估方法主要分为定性分析方法和定量分析方法两类。定性分析方法主要包括专家咨询、熵权法、案例研究和德尔菲法等&#xff1b;定量分析法主要包括层次分析法、主成分分析法、因子分析法、模糊综合评价法、色综合评价法以及数据包络分析法&#xff08;DEA法…

启科 QuSaaS 真随机数解决方案与 Amazon Braket 结合实践

作者&#xff1a;1.丘秉宜&#xff0c;2.邵伟&#xff0c;3.黄文&#xff0c;4.郭梦杰 1.亚马逊云科技 HERO&#xff1b;2.开发者生态负责人&#xff1b;3.DEVOPS 工程师&#xff1b;4.资深研发工程师 1、概述 随机性&#xff08;Randomness&#xff09;是偶然性的一种形式&…

【JavaEE】Tomcat

努力经营当下&#xff0c;直至未来明朗&#xff01; 文章目录【Tomcat】&#xff1a;http服务器THINK努力成为你想成为的人一定很酷&#xff01; 【Tomcat】&#xff1a;http服务器 http客户端就是我们平时使用的浏览器&#xff0c;但是我们还需要开发实现一个服务器来搭建网…

[FireshellCTF2020]Caas

打开界面&#xff0c;是一个运行代码的*框&#xff0c;然后我们输入 本来以为会是一个ssti模板&#xff0c;{{8*8}}却仍然还是报错&#xff0c;print echo 等输出都不行 只能分析分析报错信息看看有没有什么有用的东西 /tmp目录下的&#xff0c;class_7eamm1tu3.c后缀名是c&…

【论文阅读】(2020)Knapsack polytopes: a survey(上)

文章目录一、Abstract 摘要二、Introduction 介绍三、General polyhedral structure 一般多面体结构3.1 Basic properties 基本性质3.2 Covers 覆盖不等式四、Binary formulations based on strong covers 基于强覆盖的二元公式五、Lifting 提升5.1 Sequential up-lifting5.2 S…

2. bean加载控制

1. Controller加载控制 因为功能不同&#xff0c;要避免Spring错误的加载到SpringMVC的bean 1.1 Controller加载控制与业务bean加载控制 SpringMVC相关bean&#xff08;表现层bean&#xff09; Spring控制的bean 业务bean&#xff08;Service&#xff09; 功能bean&#xf…

Java——图

概念 图是由顶点和边组成的一种数据结构&#xff0c;我们之前介绍的树形结构中&#xff0c;树的每一个节点就是顶点&#xff0c;顶点与顶点中的连线就是边&#xff0c;也就是说&#xff0c;树是一种特殊的图 图中的边如果有方向&#xff0c;那么这个图就称为有向图&#xff0…

个人总结详细版的C++调用Opencv和Halcon封装dll

一、前言&#xff1a; 在C调用opencv和Halcon封装的过程中踩过很多坑&#xff0c;然而网上却查不到清晰地教程。在此个人总结详细教程&#xff0c;以免后人踩坑。记录下&#xff0c;以后自己忘了也可以来看看。 二、教程细节 2.1 我使用的IDE是vs2017,下面所有的介绍也都是以此…

理解操作系统(Linux)

操作系统是一款对软硬件资源进行管理的软件&#xff01; 操作系统为什么要对软硬件资源进行管理呢&#xff1f; 操作系统通过合理的管理软硬件资源的手段&#xff0c;为用户提供良好的&#xff08;稳定的、高效的、安全的&#xff09;执行环境。 操作系统是如何进行管理的呢…

机器学习100天(十七):017 逻辑回归梯度下降

机器学习 100 天,今天讲的是:逻辑回归-梯度下降! 在讲解了逻辑回归的基本原理和损失函数之后,我们来推导逻辑回归模型中参数 w 和 b 的梯度表达式。 我们之前介绍过,计算逻辑回归的代价函数实际上包含了下面三个过程: Z = W T X + b Z=W^TX+b Z=

ASOC系统简析

一 嵌入式音频系统介绍 上图是音频系统的硬件模拟图&#xff0c;声卡通过I2S接口与cpu进行音频数据传输&#xff0c;通过I2C接口与cpu进行控制通讯。 录音数据通路&#xff1a;麦克风---->声卡------I2S------>DMA---->内存&#xff1b; 播放数据通路&#xff1a;内存…

HaaS EDU物联网项目实战:野外救援项目

HaaS EDU K1是一款高颜值、高性能、高集成度的物联网开发板&#xff0c;板载功能强大的4核&#xff08;双核300Mhz M33双核1GHz A7&#xff09;主芯片&#xff0c;2.4G/5G双频Wi-Fi&#xff0c;双模蓝牙&#xff08;经典蓝牙/BLE&#xff09;&#xff0c;并自带丰富的传感器与小…

Exception in thread “main“ java.lang.NoClassDefFoundError

项目场景&#xff1a; 验证继承情况下子类创建对象时&#xff0c;先调用父类的构造方法&#xff0c;再调用子类的构造方法 问题描述 随机&#xff08;不同次数的测试下&#xff09;会产生Exception in thread "main" java.lang.NoClassDefFoundError错误 package e…

Pandas 详解

本文主要介绍python 数据分析模块 Pandas&#xff0c;并试图对其进行一个详尽的介绍。 通过阅读本文&#xff0c;你可以&#xff1a; 掌握 Anaconda 环境的安装及使用了解什么是 Pandas掌握 Series 对象基本操作掌握 DataFrame 对象的基本操作掌握缺值处理掌握 Series 对象和 D…

计算机今年炸了?现在还适合入行吗?

恍惚之间&#xff0c;一年已来到了尾声&#xff0c;对于应届生来说&#xff0c;这是不堪回首的一年&#xff0c;一个字&#xff0c;难。 不但冷门专业就业困难&#xff0c;就连过去的宇宙机专业&#xff0c;也不复盛况&#xff0c;相较于往年的火热&#xff0c;今年的计算机行…

ES6的相关知识点

一&#xff1a;var let const let var区别&#xff1a; 1.let没有变量提升&#xff08;预解析&#xff09;我们先定义再使用&#xff0c;Var可以先使用再定义因为他有预解析,var有声明提升>先上车后买票&#xff0c; 2.let不能在同一个作用域中重复定义变量&#xff0c;如…