Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/346.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
当python包安装在本地计算机上而不是安装在virtualenv上时,如何在virtualenv上安装pytest?_Python_Linux_Virtualenv_Onnx - Fatal编程技术网

当python包安装在本地计算机上而不是安装在virtualenv上时,如何在virtualenv上安装pytest?

当python包安装在本地计算机上而不是安装在virtualenv上时,如何在virtualenv上安装pytest?,python,linux,virtualenv,onnx,Python,Linux,Virtualenv,Onnx,这是我在虚拟环境中尝试安装ONNX框架的pytest和nbval时遇到的错误。我的主目录(~/)内存有限。当我尝试使用变量$IPYTHONDIR更改IPython目录路径时,它表明pytest中提到的模块丢失 当我在virtualenv中运行测试时,我得到以下结果 platform linux -- Python 3.7.7, pytest-5.4.1, py-1.8.1, pluggy-0.13.1 rootdir: /local/mnt2/workspace2/Virtual_Env/ven

这是我在虚拟环境中尝试安装ONNX框架的pytest和nbval时遇到的错误。我的主目录(~/)内存有限。当我尝试使用变量$IPYTHONDIR更改IPython目录路径时,它表明pytest中提到的模块丢失 当我在virtualenv中运行测试时,我得到以下结果

platform linux -- Python 3.7.7, pytest-5.4.1, py-1.8.1, pluggy-0.13.1
rootdir: /local/mnt2/workspace2/Virtual_Env/venv-onnx
plugins: nbval-0.9.5
collected 0 items / 1 error                                                                                                                                                                                                                 

================================================================================================================== ERRORS ===================================================================================================================
_______________________________________________________________________________________________________ ERROR collecting test session _______________________________________________________________________________________________________
lib/python3.7/site-packages/_pytest/config/__init__.py:495: in _importconftest
    return self._conftestpath2mod[key]
E   KeyError: PosixPath('/local/mnt2/workspace2/Virtual_Env/venv-onnx/lib/python3.7/site-packages/IPython/conftest.py')

During handling of the above exception, another exception occurred:
lib/python3.7/site-packages/_pytest/config/__init__.py:501: in _importconftest
    mod = conftestpath.pyimport()
lib/python3.7/site-packages/py/_path/local.py:701: in pyimport
    __import__(modname)
<frozen importlib._bootstrap>:983: in _find_and_load
    ???
<frozen importlib._bootstrap>:967: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:677: in _load_unlocked
    ???
lib/python3.7/site-packages/_pytest/assertion/rewrite.py:152: in exec_module
    exec(co, module.__dict__)
lib/python3.7/site-packages/IPython/conftest.py:69: in <module>
    inject()
lib/python3.7/site-packages/IPython/conftest.py:59: in inject
    builtins._ip = get_ipython()
lib/python3.7/site-packages/IPython/conftest.py:21: in get_ipython
    shell = TerminalInteractiveShell.instance(config=config)
lib/python3.7/site-packages/traitlets/config/configurable.py:412: in instance
    inst = cls(*args, **kwargs)
lib/python3.7/site-packages/IPython/terminal/interactiveshell.py:520: in __init__
    super(TerminalInteractiveShell, self).__init__(*args, **kwargs)
lib/python3.7/site-packages/IPython/core/interactiveshell.py:637: in __init__
    self.init_ipython_dir(ipython_dir)
lib/python3.7/site-packages/IPython/core/interactiveshell.py:737: in init_ipython_dir
    self.ipython_dir = get_ipython_dir()
lib/python3.7/site-packages/traitlets/traitlets.py:585: in __set__
    self.set(obj, value)
lib/python3.7/site-packages/traitlets/traitlets.py:574: in set
    obj._notify_trait(self.name, old_value, new_value)
lib/python3.7/site-packages/traitlets/traitlets.py:1139: in _notify_trait
    type='change',
lib/python3.7/site-packages/traitlets/traitlets.py:1176: in notify_change
    c(change)
lib/python3.7/site-packages/IPython/core/interactiveshell.py:714: in _ipython_dir_changed
    ensure_dir_exists(change['new'])
lib/python3.7/site-packages/IPython/utils/path.py:431: in ensure_dir_exists
    os.makedirs(path, mode=mode)
/usr/lib/python3.7/os.py:223: in makedirs
    mkdir(name, mode)
E   OSError: [Errno 122] Disk quota exceeded: '/usr2/tkavathe/.ipython'

During handling of the above exception, another exception occurred:
lib/python3.7/site-packages/py/_path/common.py:383: in visit
    for x in Visitor(fil, rec, ignore, bf, sort).gen(self):
lib/python3.7/site-packages/py/_path/common.py:435: in gen
    for p in self.gen(subdir):
lib/python3.7/site-packages/py/_path/common.py:435: in gen
    for p in self.gen(subdir):
lib/python3.7/site-packages/py/_path/common.py:435: in gen
    for p in self.gen(subdir):
lib/python3.7/site-packages/py/_path/common.py:424: in gen
    dirs = self.optsort([p for p in entries
lib/python3.7/site-packages/py/_path/common.py:425: in <listcomp>
    if p.check(dir=1) and (rec is None or rec(p))])
lib/python3.7/site-packages/_pytest/nodes.py:506: in _recurse
    ihook = self._gethookproxy(dirpath)
lib/python3.7/site-packages/_pytest/nodes.py:487: in _gethookproxy
    my_conftestmodules = pm._getconftestmodules(fspath)
lib/python3.7/site-packages/_pytest/config/__init__.py:473: in _getconftestmodules
    mod = self._importconftest(conftestpath)
lib/python3.7/site-packages/_pytest/config/__init__.py:509: in _importconftest
    raise ConftestImportFailure(conftestpath, sys.exc_info())
E   _pytest.config.ConftestImportFailure: (local('/local/mnt2/workspace2/Virtual_Env/venv-onnx/lib/python3.7/site-packages/IPython/conftest.py'), (<class 'OSError'>, OSError(122, 'Disk quota exceeded'), <traceback object at 0x7f1874042460>))
========================================================================================================== short test summary info ==========================================================================================================
ERROR  - _pytest.config.ConftestImportFailure: (local('/local/mnt2/workspace2/Virtual_Env/venv-onnx/lib/python3.7/site-packages/IPython/conftest.py'), (<class 'OSError'>, OSError(122, 'Disk quota exceeded'), <traceback object at 0x7f1...
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================================================================= 1 error in 0.34s ==============================================================================================================
platformlinux-python3.7.7、pytest-5.4.1、py-1.8.1、pluggy-0.13.1
rootdir:/local/mnt2/workspace2/Virtual\u Env/venv onnx
插件:nbval-0.9.5
已收集0个项目/1个错误
============================================================================================================================================================错误===================================================================================================================
_______________________________________________________________________________________________________收集测试会话时出错_______________________________________________________________________________________________________
lib/python3.7/site-packages/\u-pytest/config/\u\u-init\u\u.py:495:in\u-importconftest
返回self.\u conftestpath2mod[键]
E键错误:PosixPath('/local/mnt2/workspace2/Virtual_Env/venv onnx/lib/python3.7/site packages/IPython/conftest.py')
在处理上述异常期间,发生了另一个异常:
lib/python3.7/site-packages/\u-pytest/config/\u\u-init\u\u.py:501:in\u-importconftest
mod=conftestpath.pyimport()
lib/python3.7/site-packages/py/_-path/local.py:701:in-pyimport
__导入(modname)
:983:in _find_和_load
???
:967:in(查找)和(加载)解锁
???
:677:in_加载_解锁
???
lib/python3.7/site-packages/_-pytest/assertion/rewrite.py:152:in-exec_模块
执行官(主管、模块、指令)
lib/python3.7/site-packages/IPython/conftest.py:69:in
注入()
lib/python3.7/site-packages/IPython/conftest.py:59:in-inject
内置。_ip=get_ipython()
lib/python3.7/site-packages/IPython/conftest.py:21:in-get_-IPython
shell=TerminalInteractiveShell.instance(config=config)
lib/python3.7/site-packages/traitlets/config/configurable.py:412:in-instance
inst=cls(*args,**kwargs)
lib/python3.7/site packages/IPython/terminal/interactiveshell.py:520:in\uu init__
超级(终端交互,自我)。\uuuuuu初始(*args,**kwargs)
lib/python3.7/site-packages/IPython/core/interactiveshell.py:637:in\uu init__
self.init_ipython_dir(ipython_dir)
lib/python3.7/site packages/IPython/core/interactiveshell.py:737:in init_IPython_dir
self.ipython\u dir=get\u ipython\u dir()
lib/python3.7/site-packages/traitlets/traitlets.py:585:in\uu集__
自我设置(对象,值)
lib/python3.7/site-packages/traitlets/traitlets.py:574:in-set
对象通知特征(自我名称、旧值、新值)
lib/python3.7/site packages/traitlets/traitlets.py:1139:in\u notify\u trait
type='change',
lib/python3.7/site-packages/traitlets/traitlets.py:1176:in-notify\u-change
c(更改)
lib/python3.7/site packages/IPython/core/interactiveshell.py:714:in\u IPython\u dir\u已更改
确保目录存在(更改['new'])
lib/python3.7/site packages/IPython/utils/path.py:431:in确保目录存在
os.makedirs(路径,模式=模式)
/usr/lib/python3.7/os.py:223:in-makedirs
mkdir(名称、模式)
E OSError:[Errno 122]超过磁盘配额:'/usr2/tkavathe/.ipython'
在处理上述异常期间,发生了另一个异常:
lib/python3.7/site packages/py/_path/common.py:383:正在访问
对于访客中的x(fil、rec、ignore、bf、sort)。gen(self):
lib/python3.7/site-packages/py/_-path/common.py:435:in-gen
对于self.gen(subdir)中的p:
lib/python3.7/site-packages/py/_-path/common.py:435:in-gen
对于self.gen(subdir)中的p:
lib/python3.7/site-packages/py/_-path/common.py:435:in-gen
对于self.gen(subdir)中的p:
lib/python3.7/site-packages/py/_-path/common.py:424:in-gen
dirs=self.optsort([p代表条目中的p
lib/python3.7/site-packages/py/_-path/common.py:425:in
如果p.check(dir=1)和(rec为None或rec(p))])
lib/python3.7/site packages/\u pytest/nodes.py:506:in\u recurse
ihook=self.\u gethookproxy(dirpath)
lib/python3.7/site-packages/_-pytest/nodes.py:487:in _-gethookproxy
my_conftestmodules=pm.\u getconftestmodules(fspath)
lib/python3.7/site-packages/_-pytest/config/__-init__.py:473:in _-getconftestmodules
mod=self.\u importconftest(conftestpath)
lib/python3.7/site-packages/\u-pytest/config/\u\u-init\u.py:509:in\u-importconftest
引发ConftestImportFailure(conftestpath,sys.exc_info())
E_pytest.config.ConftestImportFailure:(local('/local/mnt2/workspace2/Virtual_Env/venv onnx/lib/python3.7/site packages/IPython/conftest.py'),(,OSError(122,'超过磁盘配额'),)
=============================================================================================================================================================================================简短的测试摘要信息==========================================================================================================

错误-_pytest.config.ConftestImportFailure:(本地('/local/mnt2/workspace2/Virtual_Env/venv onnx/lib/python3.7/site packages/IPython/conftest.py'),(,OSError(122,'超出磁盘配额'),请清除所有临时文件夹和所有不需要的文件

stacktrace清楚地表明磁盘配额已超过。
磁盘配额是允许存储在给定磁盘或位置的最大数据量

,该错误表示磁盘空间不足(配额)为了你的user@jordanm我知道我的磁盘空间已超出使用范围。但我想知道如何在其他位置创建临时文件夹,因为我无法访问该用户空间。嗨,我无法更改磁盘空间,也无法删除文件,因为它们是必需的。是否有