windows下cmd启动spder没有反应

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/weixin_42338058/article/details/90452799

这篇博客https://blog.csdn.net/qq_42868008/article/details/82962293

提到可能是图形界面出了问题,需安装PyQt5,我用“pip install PyQt5”命令,安装失败,使用如下命令安装成功

但是spyder依旧打不开,报错为

https://blog.csdn.net/inch2006/article/details/82983465

这篇博客说,conda卸载spyder,再用pip装即可

再安装

即可打开

 

展开阅读全文

cmd启动的程序自动关闭

09-01

我是新手,遇到点麻烦,向各位请教:rn 使用C#里面的process启动cmd命令行,在cmd中启动其他程序,该程序启动后不到10秒便会自动关闭,不知道是什么原因。以下是我写的代码:rnrn public void Login(string userID, string userPassWord, string projectName, string subprojectName, string path)rn rnrn accountName = userID;rn accoutPassword = userPassWord;rn project = projectName;rn subpro = subprojectName;rnrn // Create the directory if it does not exist.rn DirectoryInfo pathName = new DirectoryInfo(path);rn if (!pathName.Exists)rn rn pathName.Create();rn targetDirection = pathName.FullName + "\\";rn rn elsern rn targetDirection = pathName.FullName + "\\";rn rnrn string progremPath = @"cd /d C:\Program Files\eng\v2_2b2\bin";rn string initial_cmd = " -user=" + accountName + " -pass=" + accoutPassword + " -proj=" + project + " -sub=" + subpro + " -def=" + targetDirection;rn p = new Process();rn p.StartInfo.FileName = "cmd.exe";rn p.StartInfo.UseShellExecute = false;rn p.StartInfo.RedirectStandardInput = true;rn p.StartInfo.RedirectStandardOutput = true;rn p.StartInfo.RedirectStandardError = true;rn p.StartInfo.CreateNoWindow = false;rn p.Start();rn p.StandardInput.WriteLine(progremPath);rn p.StandardInput.WriteLine(initial_cmd);rn if (!Check__Start())rn rn MessageBox.Show(" cannot start!");rn Process.GetCurrentProcess().Kill();rn rn else rn rn MessageBox.Show(" start!");rn rn rn rn private bool Check_Start()rn rn //check if the program has startedrn //search 10 times,5 seconds per timern //if not find, exitrn int searching_times = 1;rn dorn rn foreach (Process thisproc in System.Diagnostics.Process.GetProcesses())rn rn if (thisproc.ProcessName == "javaw")rn rn return true;rn rn rn Thread.Sleep(5000);rn searching_times++;rn while (searching_times < 10);rn return false;rn 论坛

没有更多推荐了,返回首页