python3-tk(v 3.5.1-1)和python 3.5是通过apt-get安装的。之后,我使用以下命令创建了venv:
@section('body')
<!--{{session('uid')}} -->
<div class="col-sm-12">
<!-- Wizard container -->
<div class="wizard-container">
<div class="card wizard-card" data-color="red" id="wizard">
<form action="{{URL::to('faculty/submitreport')}}" method="post" name="reportform">
<!-- You can switch " data-color="blue" " with one of the next bright colors: "green", "orange", "red", "purple" -->
{{ csrf_field()}}
<div class="wizard-header">
<h3 class="wizard-title">
Monthly Progress Report
</h3>
<h5>This information will let us know more about you.</h5>
</div>
@foreach($fetchform as $data)
@foreach($fetchans as $ans)
@if(is_null($ans)){
@break
<div class="wizard-navigation">
<ul>
<li><a href="#details" data-toggle="tab">{{$data->f_title}}</a></li>
</ul>
</div>
<div class="tab-content">
<div class="tab-pane" id="details">
<div class="row">
<div class="col-lg-12">
@if(is_null($data->f1))
@else
<div class="form-group label-floating"> <label class="control-label">{{$data->f1}}</label>
<input name="f1" type="text" class="form-control"value='{{$ans->f1}}'></input>
</div>
@endif
@if(is_null($data->f2))
@else
<div class="form-group label-floating">
<label class="control-label">{{$data->f2}}</label>
<input name="f2" type="text" class="form-control" value='{{$ans->f2}}'></input>
</div>
@endif
@if(is_null($data->f3))
@else
<div class="form-group label-floating">
<label class="control-label">{{$data->f3}}</label>
<input name="f3" type="text" class="form-control" value='{{$ans->f3}}'></input>
</div>
@endif
@if(is_null($data->f4))
@else
<div class="form-group label-floating">
<label class="control-label">{{$data->f4}}</label>
<input name="f4" type="text" class="form-control" value='{{$ans->f4}}'></input>
</div>
@endif
@if(is_null($data->f5))
@else
<div class="form-group label-floating">
<label class="control-label">{{$data->f5}}</label>
<input name="f5" type="text" class="form-control" value='{{$ans->f5}}'></input>
</div>
@endif
@if(is_null($data->f6))
@else
<div class="form-group label-floating">
<label class="control-label">{{$data->f6}}</label>
<input name="f6" type="text" class="form-control" value='{{$ans->f6}}'></input>
</div>
@endif
@if(is_null($data->f7))
@else
<div class="form-group label-floating">
<label class="control-label">{{$data->f7}}</label>
<input name="f7" type="text" class="form-control" value='{{$ans->f7}}'></input>
</div>
@endif
@if(is_null($data->f8))
@else
<div class="form-group label-floating">
<label class="control-label">{{$data->f8}}</label>
<input name="f8" type="text" class="form-control" value='{{$ans->f8}}'></input>
</div>
@endif
@if(is_null($data->f9))
@else
<div class="form-group label-floating">
<b> <label class="control-label">{{$data->f9}}</label></b>
<input name="f9" type="text" class="form-control" value='{{$ans->f9}}'></input>
</div>
@endif
@if(is_null($data->f10))
@else
<div class="form-group label-floating">
<b> <label class="control-label">{{$data->f10}}</label></b>
<input name="f10" type="text" class="form-control" value='{{$ans->f10}}'></input>
</div>
@endif
@if(is_null($data->f11))
@else
<div class="form-group label-floating">
<b> <label class="control-label">{{$data->f11}}</label> </b>
<input name="f11" type="text" class="form-control" value='{{$ans->f11}}'></input>
</div>
@endif
@if(is_null($data->f12))
@else
<div class="form-group label-floating">
<b> <label class="control-label">{{$data->f12}}</label></b>
<input name="f12" type="text" class="form-control" value='{{$ans->f12}}'></input>
</div>
@endif
<input type='hidden' name="f_id" value='{{$data->f_id}}'>
<input type='hidden' name="u_id" value='{{session()->get("uid")}}'>
<input type='hidden' name="f_status" id="f_status" />
</div>
}
@endif
@endforeach
@endforeach
</div>
</div>
</div>
</div>
<div class="wizard-footer">
<div class="pull-right">
<input type='submit' class='btn btn-next btn-fill btn-danger btn-wd-lg' name='save' value='Save' />
<input type='button' class='btn btn-finish btn-fill btn-danger btn-wd-lg' onclick="myFunction()" name='Submit' value='submit' />
</div>
<div class="clearfix"></div>
</div>
</form>
</div>
</div> <!-- wizard container -->
</div>
<script>
function myFunction() {
var txt;
var r = confirm("Really Do You Want To Finally Submit a Form \n After Submitting You Can't Update Anything into It.");
if (r == true) {
document.getElementById("f_status").value = '1';
reportform.submit();
} else {
}
}
</script>
我也尝试了不带--copies标志但没有任何更改的尝试。
很显然,在venv中找不到python3-tk,因为应用程序抛出以下异常,因为python-tk似乎是某些matplotlibs的依赖项。
var obj = {
a: true,
b: false,
c: false
};
var res = Object.values(obj).reduce((m, o) => m + o) === 1;
console.log(res);
我还在stackoverflow上找到了与服务器相关的线程,这些线程修改了激活脚本并添加了符号链接或环境变量。但是我不确定必须提供哪种符号链接到什么位置以及必须设置哪种env变量才能让python 3与tk一起使用,因为这些教程解决了Windows和/或python 2.7相关问题。