如何让终端运行像/manage.py这样的脚本,它将使用python3而不是python2?如果我输入'python'它运行python3,但是这个命令运行python2。
答案 0 :(得分:2)
<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">I T B S - Intranet</a>
</div>
<!-- /.navbar-header -->
<ul class="nav navbar-top-links navbar-right">
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-money fa-fw"></i> <i class="fa fa-caret-down"></i>
</a>
<ul class="dropdown-menu dropdown-tasks " >
<li>
<a href="#">
<div>
<p>
<h4 class="text-center"><strong>Prestaciones disponibles</strong></h4>
<div class="divider"></div>
<h4 class="text-center">3123123 Bsf.</h4>
<ng-menu></ng-menu>
</p>
</div>
</a>
</li>
<li class="divider"></li>
<li>
<a class="text-center" href="historialpagos.html">
<strong>Ver historial de pagos</strong>
<i class="fa fa-angle-right"></i>
</a>
</li>
</ul>
<!-- /.dropdown-user -->
</li>
<!-- /.dropdown -->
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-sun-o fa-fw"></i> <i class="fa fa-caret-down "></i>
</a>
<!-- /.Solicitudes de vacaciones -->
<ul class="dropdown-menu dropdown-tasks">
<li>
<a href="#">
<div>
<p>
<strong>Solicitud 1</strong>
<span class="pull-right text-muted"><div><strong>Desde:</strong>01/01/2001 </br><strong>Hasta:</strong>02/02/2002</div></span>
</p>
<div class="progress progress-striped active">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 100%">
Aceptada
</div>
</div>
</div>
</a>
</li>
<li class="divider"></li>
<li>
<a href="#">
<div>
<p>
<strong>Solicitud 2</strong>
<span class="pull-right text-muted"><div><strong>Desde:</strong>03/03/2003 </br><strong>Hasta:</strong>04/04/2004</div></span>
</p>
<div class="progress progress-striped active">
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 50%">
En proceso
</div>
</div>
</div>
</a>
</li>
<li class="divider"></li>
<li>
<a href="#">
<div>
<p>
<strong>Solicitud 3</strong>
<span class="pull-right text-muted"><div><strong>Desde:</strong>05/05/2005 </br><strong>Hasta:</strong>06/06/2006</div></span>
</p>
<div class="progress progress-striped active">
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 100%">
Rechazada
</div>
</div>
</div>
</a>
</li>
<li class="divider"></li>
<li>
<a class="text-center" href="historialdevacaciones.html">
<strong>Ver historial de vacaciones</strong>
<i class="fa fa-angle-right"></i>
</a>
</li>
</ul>
<!-- /.Solicitudes de vacaciones -->
</li>
<!-- /.dropdown -->
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-user fa-fw"></i> <i class="fa fa-caret-down"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="#"><i class="fa fa-user fa-fw"></i> {{"Angular User"}}</a>
</li>
<li class="divider"></li>
<li><a href="login.html"><i class="fa fa-sign-out fa-fw"></i> Logout</a>
</li>
</ul>
<!-- /.dropdown-user -->
</li>
<!-- /.dropdown -->
</ul>
<!-- /.navbar-top-links -->
<div class="navbar-default sidebar" role="navigation">
<div class="sidebar-nav navbar-collapse">
<ul class="nav" id="side-menu">
<!--Menu modulo de perfil de empleado-->
<li class="active">
<a href="#"><i class="fa fa-user fa-fw"></i> Perfil del empleado<span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li>
<a href="perfilempleado.html">Consultar datos de empleado</a>
</li>
<li>
<a href="actualizardatospersonales.html">Actualizar datos personales</a>
</li>
<li>
<a href="#">Actualizar datos profesionales<span class="fa arrow"></span></a>
<ul class="nav nav-third-level">
<li>
<a href="#">Cursos</a>
</li>
<li>
<a href="#">Certificaciones</a>
</li>
<li>
<a href="#">Estudios</a>
</li>
<li>
<a href="#">Experiencia laboral</a>
</li>
<li>
<a href="#">Conocimientos</a>
</li>
</ul>
<!-- /.nav-third-level -->
</li> </ul>
<!-- /.nav-second-level -->
</li>
<!--Menu modulo de vacaciones-->
<li >
<a href="#"><i class="fa fa-sun-o fa-fw"></i> Gestion de control <span class="fa arrow"></span> de vacaciones</a>
<ul class="nav nav-second-level">
<li>
<a href="solicitatvacaciones.html">Solicitar vacaciones</a>
</li>
<li>
<a href="historialdevacaciones.html">Ver historial de solicitudes de vacaciones</a>
</li>
</ul>
<!-- /.nav-second-level -->
</li>
<li >
<a href="#"><i class="fa fa-money fa-fw"></i> Pagos <span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li>
<a href="historialpagos.html">Ver historial de pagos</a>
</li>
</ul>
<!-- /.nav-second-level -->
</li>
<li >
<a href="generardocumentos.html"><i class="fa fa-files-o fa-fw"></i> Documentos</a>
<!-- /.nav-second-level -->
</li>
</ul>
</div>
<!-- /.sidebar-collapse -->
</div>
<!-- /.navbar-static-side -->
</nav>
<script src="../bower_components/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="../bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- Metis Menu Plugin JavaScript -->
<script src="../bower_components/metisMenu/dist/metisMenu.min.js"></script>
<!-- Custom Theme JavaScript -->
<script src="../dist/js/sb-admin-2.js"></script>
的第一行应该是:
<!-- jQuery -->
<script src="../bower_components/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="../bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- Metis Menu Plugin JavaScript -->
<script src="../bower_components/metisMenu/dist/metisMenu.min.js"></script>
<!-- Custom Theme JavaScript -->
<script src="../dist/js/sb-admin-2.js"></script>
这称为shebang,告诉你的shell应该根据manage.py
中python的哪个版本来使用哪个python安装。
如果第一行不是#!/usr/bin/env python3
,那应该是。{如果是,您应该 将 python3的位置添加到$PATH
。
您需要将以下内容添加到#!/usr/bin/env python3
:
$PATH