下面是我在 spyder 和 python 中运行的非常基本的代码令人窒息,我做错了什么?
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()
is not available .
关于python - AttributeError: 模块 'os' 没有属性 'chroot',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40051790/