[英]how can I run zip through cmd, where it's not found?
zip is not recognized as an internal or external command
where can I find zip
on my machine in order to run我在哪里可以找到
zip
在我的机器上运行
'zip` cmd? '邮编'cmd?
You need to install the aplication.您需要安装该应用程序。 Later, add the folder where is located to your system PATH environment variable.
稍后,将所在的文件夹添加到您的系统 PATH 环境变量中。
I had to run a bat file which had zip command to be executed, I used to get "'zip' is not recognized as an internal or external command, operable program or batch file."我不得不运行一个 bat 文件,它有要执行的 zip 命令,我曾经得到“'zip'不被识别为内部或外部命令、可运行的程序或批处理文件。”
I went to http://stahlworks.com/dev/index.php?tool=zipunzip , downloaded zip.exe and set it in Environment variables, it is working for me now.我去了http://stahlworks.com/dev/index.php?tool=zipunzip ,下载了 zip.exe 并将其设置在环境变量中,它现在对我有用。
The below method worked for me.下面的方法对我有用。
By default, Windows doesn't support zip command.默认情况下,Windows 不支持 zip 命令。 Instead, install a third party software like 7-zip.
相反,安装第三方软件,如 7-zip。 If you are using npm, then copy the "7z.exe" to the folder where npm is installed.
如果您使用的是 npm,则将“7z.exe”复制到安装 npm 的文件夹中。 In my case, npm was installed under "C:\\Users\\user-name\\AppData\\Roaming\\npm"
就我而言,npm 安装在“C:\\Users\\user-name\\AppData\\Roaming\\npm”下
I use 7-Zip as my zip tool, and the name of its file is 7z.exe.我使用 7-Zip 作为我的 zip 工具,它的文件名是 7z.exe。 Windows expects the name to be zip.exe, not 7z.exe.
Windows 期望名称为 zip.exe,而不是 7z.exe。 So, I renamed it to zip.exe and it did the trick.
所以,我将它重命名为 zip.exe,它成功了。 Don't forget to add the renamed file to environment variable path.
不要忘记将重命名的文件添加到环境变量路径中。
tar -cvzf Your_deployment_package.zip files.py
Use tar -cvzf in start instead of zip will work for me.在开始时使用 tar -cvzf 而不是 zip 对我有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.