当前位置:网站首页>Solution: how to use bash batch command in win10
Solution: how to use bash batch command in win10
2022-07-27 04:56:00 【Medium coke with ice】
Problem description
Bash It's most Linux Default on distribution shell.
stay Windows Next comes the new version DFGAN when , because DFGAN The command and parameters are packaged into .sh Batch file , Sometimes you need bash command , And in the input bash On command : bash scripts/train.sh ./cfg/coco.yml, The following error may occur :
bash : Cannot be “bash” Item identified as cmdlet、 function 、 The name of the script file or runnable program . Please check the spelling of the name , If the path is included , Please make sure the path is correct , then try again .
The position of That's ok :1 character : 1
‘bash’ Not an internal or external command , Nor are they runnable programs or batch files .
Show random code :‘bash’ �����ڲ����ⲿ���Ҳ���ǿ����еij��� ���������ļ���
Question why
Windows Failed to support bash Instructions
Solution
1、 Use the old console
open cmd Console , Right click on the , Open properties , Then click use old console , Then open it again cmd Conduct bash Command input

2、 Use git-bash
git bash Is a suitable for Microsoft Windows Applications for the environment , It's for Git The command line experience provides a simulation layer ; Equivalent to the window through git bash This simulated Unix Command line terminal .
open git The installation directory , open git-bash.exe
And then through cd Entry directory , Conduct bash Command input
3、 Turn on linux Subsystem use bash
open Procedures and functions , Click enable or close Windows function 
Open for Linux Of Windows Subsystem 
Then restart the computer , Input again bash command
4、 Use os.system
Create a py file , Use os.system perform sh file
import os
os.system('train.sh ./cfg/coco.yml')
5、 install WSL
install WSL, Configuration applies to Linux Of Windows Subsystem GNU/Linux Environmental Science - Including most command line tools 、 Utilities and Applications - And there is no overhead of traditional virtual machine or dual boot settings .
Then open the WSL, Move the project into the folder of the subsystem to run .
边栏推荐
- Basic configuration of static routing to achieve network wide accessibility
- 深度学习领域图像分割FCN(Fully Convolutional Networks for Semantic Segmentation)
- 在有序数组找具体某个数字
- Visualization domain svg
- Pinia入门到精通,Pinia使用全流程,包含state,actions,getters,以及如何解构,进行响应,actions使用的多种方法
- Horizon sunrise X3 PI (IV) running on board (unfinished)
- 新手小白怎样开始学做自媒体呢?
- Summary of fire safety training materials
- Prometheus node exporter common monitoring indicators
- 「Photoshop2021入门教程」“拉平”带有透视感的图像
猜你喜欢

【独立站建设】跨境电商出海开网店,首选这个网站建设!

Use unity to build a WordArt system

Prometheus node exporter common monitoring indicators

VSCode开启Pull Request更新代码分支可视化新篇章

How to do smooth data migration: Double write scheme

STM32 Hal serial port (uart/usart) debugging experience (I) -- basic knowledge of serial port communication +hal library code understanding
![[day02] Introduction to data type conversion, operators and methods](/img/81/e2c49a4206e5d0d05308a1fc881626.png)
[day02] Introduction to data type conversion, operators and methods

Visualization domain svg

2019 top tennis cup upload

【C语言】自定义类型详解(结构体+枚举+联合)
随机推荐
STL 上头系列——list 容器详解
打开编程的大门
勤于奋聊聊现在还有哪些副业可以做
Easy to use mobile app automation testing framework where to find? Just collect this list!
负数的右移
Bo Yun container cloud and Devops platform won the trusted cloud "technology best practice Award"
Cloudcompare & PCL match point distance suppression
Pinia uses plug-ins for persistent storage.
使用Unity做一个艺术字系统
详解左值、右值、左值引用以及右值引用
0 dynamic programming medium leetcode467. The only substring in the surrounding string
Full revolutionary networks for semantic segmentation (FCN)
Session&Cookie&token
Shift right of negative numbers
关于gorm的BeforeDelete钩子方法不生效的问题
博云容器云、DevOps 平台斩获可信云“技术最佳实践奖”
新手小白怎样开始学做自媒体呢?
C language - two dimensional array, pointer
HCIA dynamic routing rip basic experiment
背包问题dp