区健强 2020-08-03 16:56 采纳率: 0%
浏览 975

安装pytest时,在cmd输入pytest就会报错

图片说明
C:\Users\Administrator.000>pytest
================= test session starts =================
platform win32 -- Python 3.8.5, pytest-6.0.1, py-1.9.0, pluggy-0.13.1
rootdir: C:\Users\Administrator.000
collected 0 items / 1 error

==================== ERRORS ====================
____________________ ERROR collecting test session ________________________

appdata\local\programs\python\python38\lib\site-packages\py_error.py:66: in checked_call

 return func(*args, **kwargs)

E PermissionError: [WinError 5] 拒绝访问。: 'C:\Users\Administrator.000\AppData\Local\Application Data'

During handling of the above exception, another exception occurred:

appdata\local\programs\python\python38\lib\site-packages\py_path\common.py:383: in visit

    for x in Visitor(fil, rec, ignore, bf, sort).gen(self):

appdata\local\programs\python\python38\lib\site-packages\py_path\common.py:435: in gen

 for p in self.gen(subdir):

appdata\local\programs\python\python38\lib\site-packages\py_path\common.py:435: in gen

    for p in self.gen(subdir):

appdata\local\programs\python\python38\lib\site-packages\py_path\common.py:435: in gen

 for p in self.gen(subdir):

appdata\local\programs\python\python38\lib\site-packages\py_path\common.py:420: in gen

 entries = path.listdir()

appdata\local\programs\python\python38\lib\site-packages\py_path\local.py:395: in listdir

 names = py.error.checked_call(os.listdir, self.strpath)

appdata\local\programs\python\python38\lib\site-packages\py_error.py:86: in checked_call

    raise cls("%s%r" % (func.__name__, args))

E py.error.EBUSY: [Resource device]: listdir('C:\Users\Administrator.000\AppData\Local\Application Data',)

============= short test summary info =================

ERROR - py.error.EBUSY: [Resource device]: listdir('C:\Users\Administrator.000\AppData\Local\Application Data',)

!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!

  • 写回答

2条回答 默认 最新

  • threenewbee 2020-08-03 17:01
    关注

    C:\Users\Administrator.000\AppData\Local\Application Data
    这个目录可能没有权限,你换一个d盘上的目录试试看

    评论

报告相同问题?

悬赏问题

  • ¥15 欧拉系统opt目录空间使用100%
  • ¥15 ul做导航栏格式不对怎么改?
  • ¥20 用户端如何上传图片到服务器和数据库里
  • ¥15 现在研究生在烦开题,看了一些文献,但不知道自己要做什么,求指导。
  • ¥30 vivado封装时总是显示缺少一个dcp文件
  • ¥100 pxe uefi启动 tinycore
  • ¥15 我pycharm运行jupyter时出现Jupyter server process exited with code 1,然后打开cmd显示如下
  • ¥15 可否使用carsim-simulink进行四轮独立转向汽车的联合仿真,实现四轮独立转向汽车原地旋转、斜向形式、横移等动作,如果可以的话在carsim中如何进行相应设置
  • ¥15 Caché 2016 在Java环境通过jdbc 执行sql报Parameter list mismatch错误,但是同样的sql使用连接工具可以查询出数据
  • ¥15 疾病的获得与年龄是否有关