---
title: "/usr/bin/python^M: bad interpreter: No such file or dir解决办法"
author: "youanyyou"
date: "2015-08-03T15:21:09Z"
tags: []
categories: ["编程语言"]
slug: "usr-bin-python-m-bad-interpreter-no-such-file-or-dir"
draft: false
lastmod: "2015-08-03T15:21:19Z"
id: 2232468
url: "https://itlol.iteye.com/blog/2232468"
---

Linux直接./xx.py执行python脚本时报错

修改脚本文件编码

$vi xx.py

$set ff=unix

$:wq