本文介绍了AttributeError:模块"os"没有属性"chroot"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面是我在spyder&中运行的非常基本的代码; python令人窒息,我在做什么错了?

Below is my very basic code running in spyder & python is choking, what am I doing wrong?

import csv,os,sys
path = os.getcwd()
print (path)
os.chroot(path)

我收到以下错误消息:

  os.chroot(path)

AttributeError: module 'os' has no attribute 'chroot'

推荐答案

一种可能性是您的操作系统是Microsoft Windows,为此 os.chroot()不可用.

One possibility is that your operating system is Microsoft Windows, for which os.chroot() is not available.

这篇关于AttributeError:模块"os"没有属性"chroot"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 10:32