conda构建:刚创建的目录上的访问错误 [英] conda build: Access error on just-created directory

查看:85
本文介绍了conda构建:刚创建的目录上的访问错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 conda build。构建一个conda软件包。我走得很远,但是经过测试,我得到了以下输出:

I'm trying to build a conda package with conda build .. I'm getting quite far, but after the tests, I get this output:

Renaming work directory,  C:\ProgramData\Miniconda3\envs\p37\conda-bld\<package-name>_1596716574942\work  to  
    C:\ProgramData\Miniconda3\envs\p37\conda-bld\<package-name>_1596716574942\work_moved_<package-name>-1.1.1-py38_0_win-64
Traceback (most recent call last):
  File "C:\ProgramData\Miniconda3\envs\p37\lib\shutil.py", line 566, in move
    os.rename(src, real_dst)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 
    'C:\\ProgramData\\Miniconda3\\envs\\p37\\conda-bld\\<package-name>_1596716574942\\work' ->
    'C:\\ProgramData\\Miniconda3\\envs\\p37\\conda-bld\\<package-name>_1596716574942\\work_moved_<package-name>-1.1.1-py38_0_win-64'

但是,如果conda构建本身只有一个刚刚创建了整个目录?我只是为了安全起见重新启动,但这并没有帮助。

But how can that be when conda build itself has only just created the entire directory? I just rebooted to be on the safe side, but that did not help. Neither did running conda build in an administrator prompt.

为什么conda不能为python 3.8生成? meta.yaml指定 python> = 3.6 ,而我所在的conda环境已安装Python 3.7- python --version 给出 3.7.6 。指定 conda build。 --python = 3.7 不会更改软件包名称-它仍然是... py38 ...

And why does conda build build for python 3.8? The meta.yaml specifies python>=3.6 and the conda environment I'm in has Python 3.7 installed - python --version on the command line gives 3.7.6. Specifying conda build . --python=3.7 does not change the package name - it is still ...py38...

推荐答案

原因是我正在setup.py中启动一个子进程。令人困惑的是,它在一台机器上的工作方式就像100%一样,而另一台机器上的工作却失败了100%,而且在周末访问之前将程序留在断点处(因此子进程应该有时间完成)。但是,更改

The reason for this was that I was starting a subprocess in the setup.py. It was somewhat perplexing that it worked like that 100% on one machine and failing 100% on another and also that leaving the program in the breakpoint just before the access over the weekend (so that subprocesses should have time to finish). However, changing

cmd = 'pandoc -s --toc -t html doc/manual.md -o '+html_path
subprocess.run(cmd)

os.system(cmd)

解决了我的问题。

这篇关于conda构建:刚创建的目录上的访问错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆