_jb_pytest_runner.py: error: unrecognized arguments: --cov

解决方法在运行pytest代码时,出现的问题,解决方法:
在环境中安装pytest-cov这个第三方库

安装gdist库时,出现的问题

ERROR: Command errored out with exit status 1:
command: ‘D:\ProgramData\Anaconda3\envs\py36\python.exe’ -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"‘C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-5cbsdogh\gdist\setup.py’"’"’; file=’"’"‘C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-5cbsdogh\gdist\setup.py’"’"’;f=getattr(tokenize, ‘"’"‘open’"’"’, open)(file);code=f.read().replace(’"’"’\r\n’"’"’, ‘"’"’\n’"’"’);f.close();exec(compile(code, file, ‘"’"‘exec’"’"’))’ bdist_wheel -d ‘C:\Users\ADMINI~1\AppData\Local\Temp\pip-wheel-99kkd7xz’
cwd: C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-5cbsdogh\gdist
Complete output (25 lines):
running bdist_wheel
running build
running build_ext
cythoning gdist.pyx to gdist.cpp
D:\ProgramData\Anaconda3\envs\py36\lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive ‘language_level’ not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-5cbsdogh\gdist\gdist.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
warning: gdist.pyx:277:47: local variable ‘distance’ referenced before assignment
warning: gdist.pyx:279:16: local variable ‘distance’ referenced before assignment
warning: gdist.pyx:279:51: local variable ‘distance’ referenced before assignment
warning: gdist.pyx:282:28: local variable ‘distance’ referenced before assignment
building ‘gdist’ extension
creating build
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -ID:\ProgramData\Anaconda3\envs\py36\lib\site-packages\numpy\core\include -Igeodesic_library -ID:\ProgramData\Anaconda3\envs\py36\include -ID:\ProgramData\Anaconda3\envs\py36\include “-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\include” “-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include” “-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um” “-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt” “-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared” “-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um” “-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt” “-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt” /EHsc /Tpgdist.cpp /Fobuild\temp.win-amd64-3.6\Release\gdist.obj
gdist.cpp
d:\programdata\anaconda3\envs\py36\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(14) : Warning Msg: Using deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
geodesic_library\geodesic_mesh_elements.h(319): error C2039: “max”: 不是“std”的成员
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\vector(20): note: 参见“std”的声明
geodesic_library\geodesic_mesh_elements.h(319): error C3861: “max”: 找不到标识符
geodesic_library\geodesic_algorithm_exact.h(23): warning C4267: “参数”: 从“size_t”转换到“unsigned int”,可能丢失数据
geodesic_library\geodesic_algorithm_exact.h(550): warning C4267: “=”: 从“size_t”转换到“unsigned int”,可能丢失数据
geodesic_library\geodesic_algorithm_exact.h(1374): warning C4244: “初始化”: 从“unsigned __int64”转换到“double”,可能丢失数据
gdist.cpp(2816): warning C4018: “<”: 有符号/无符号不匹配
error: command ‘C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe’ failed with exit status 2
ERROR: Failed building wheel for gdist

由于whl文件找错了
安装包的最新版本

出现自己的包无法调用,并且报错的情况,需要在from前面加

import sys
sys.path.append('D:\\文件夹的绝对路径')

在windows是使用双斜杠

实现路径下的特定文件复制到特定的地址(其中sor_name目标文件的初始位置,,需要包括地址加文件名,dst_name将文件保存到特定地址,同时也需要添加文件名.后缀)

import shutil
sor_name = osp.join(dpath, name)
dst_name = osp.join(self.raw_dir, name)
shutil.copyfile(sor_name, dst_name)

Coverage.py warning: Module test_dropout.py::test_dropout_adj was never imported. (module-not-imported)


在官方手册上看到的,改了一下好像确实运行起来是没问题的

coverage.misc.CoverageException: No data to report.

解决方法

from .gcn2_con import GCN2Con

.就是./,表示目录层级

pytest test --html=report_2.html --self-contained-html

对test文件夹里面的pytest文件进行测试,然后生成report.html报告文件

运行代码时出现的问题相关推荐

  1. Visual Studio2022 运行代码时“发生生成错误,是否继续并运行上次的成功生成”

    VS2022运行代码时"发生生成错误,是否继续并运行上次的成功生成" 点击是出现 "无法启动程序系统找不到指定文件" 这时,注意看下面的输出框:'scanf': ...

  2. java冻结账号功能代码_java-JFrame在连续运行代码时冻结

    我在使用JFrame时遇到问题,而在 连续运行代码.下面是我的代码: >单击btnRun时,我调用了函数MainLoop(): ActionListener btnRun_Click = new ...

  3. 运行代码时输出“1.#INF00”和“1.$”是什么情况

    程序运行后 结果屏幕上的DOS窗口中显示的输出值是:"1.#INF00",而不是一个实型数据 1.#INF / inf:这个值表示"无穷大 (infinity 的缩写)& ...

  4. IDEA里运行代码时出现Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger的解决办法(图文详解)...

    问题详情 运行出现log4j的问题 "C:\Program Files\Java\jdk1.8.0_66\bin\java" -Didea.launcher.port=7533 & ...

  5. scala java funtion1_当我在ScalaIDE中运行代码时,为什么要获取`java.lang.NoClassDefFoundError:scala / Function1`?...

    这是一个简单的测试,我用来从 Java调用Scala方法: public static void main(String args[]) { java.util.Map> rec = news. ...

  6. Keras运行代码时出现的问题及解决方法

    1.keras 运行出现 TypeError: softmax() got an unexpected keyword argument 'axis'. 出现这个问题是由于keras的版本过高,与Te ...

  7. ubuntu下面codelite运行代码一闪而过的问题、codelite的代码排版快捷键、去掉xfce4的Ctrl+F5

    运行一个helloword的例子时,会发现运行后一闪而过, ubuntu下,我们知道运行结果默认输出在terminal上, 所以这个一闪而过,我们会发现其实是最小化了,只要把上次运行的结果termia ...

  8. idea 使用mybatis generator生成代码时 报错 The specified target project directory src/main/java/ does not exis

    使用Eclipse时一切正常, 切换到idea就报错, 虽然可以用绝对路径, 但是不搞明白总觉得不爽 报错的源码 DefaultShellCallback 类 59行, 没理解 new File() ...

  9. IEAD中运行代码,出现找不到或无法加载主类

    IDEA软件运行代码时,出现找不到或无法加载主类 将IDEA重新装了一次,结果运行时出现各种问题,将其列出,方便下次查找 三种情况 第一种: 首先查看这里是否有多个,只保留当前需要用工程路径.点击P右 ...

  10. 关于运行Python时出现ImportError: cannot import name 'InteractiveConsole'的解决方案,看似简单,实则致命!!

    目录 一.出现的问题 二.解决方法 三.注意事项 一.出现的问题 1.博主在运行Python代码时,发现报错,错误如下: ImportError: cannot import name 'Intera ...

最新文章

  1. python打包成exe可执行文件指定进程名字
  2. 中国科协发布20个重大科学问题和工程技术难题
  3. 使用ganymed-ssh2-build通过ssh获得远程服务器参数
  4. mysql 判断表或字段存不存在
  5. linux class device
  6. Python3安装配置【转】
  7. 微信小程序中input和picker之间切换导致input无法失去焦点
  8. 【NLP】到目前为止,机器学习与自然语言处理相遇的那些事
  9. HTTP API领域在围绕OAS进行整合
  10. tms tck_两个用于Eclipse的TCK –开源到底有什么?
  11. 聚类分析在用户行为中的实例_看完这篇,你还敢说不懂聚类分析?
  12. 获取数据库时间相差8小时_JAVA 程序展示时间与数据表保存的时间相差了13个小时...
  13. Laravel核心解读 -- 用户认证系统(基础介绍)
  14. yum命令在线下载mysql数据库_用yum命令安装mysql数据库
  15. Python使用numpy滤除图像中的低频信号
  16. linux常用命令笔记大全
  17. Splash特征描述子
  18. 《Head First HTML and CSS 》中英文下载链接
  19. ftp下载,6步掌握ftp下载软件的使用方法
  20. android手机设置固定dns,手机怎么设置dns 手机设置dns方法【详解】

热门文章

  1. redis问题及答案
  2. 上海麻辣马资深程序员叶劲峰:我的游戏人生
  3. 刘强东不是一个人,互联网寒冬真的来了
  4. html怎么将坐标轴变成百分比,Excel中进行设置双坐标及次坐标轴显示百分比的方法...
  5. 辉群 mysql支持,群辉下的nas各项共享设置——白羊座适用
  6. 数据库三大范式、BCNF范式、反范式
  7. 汽车汽油电子喷射系统
  8. 宝塔 无法自动认证,请填写本地服务器的登录信息
  9. QPushButton中clicked消息参数一直返回false问题解决方法
  10. 微信公众号点击图片跳转关注