如何在virtualenv中使用java调用python? 这是我的.sh文件
#!/bin/bash
source activate pytorch41&&
cd /home/cery/workspace/pytorch-CycleGAN-and-pix2pix&&
python test.py --dataroot datasets/vangogh2photo/SHU --name style_vangogh_pretrained --model test --no_dropout
当我在终端中使用它时,它运行了,但在java中失败了
String[] args = new String[] {"bash","/home/cery/workspace/pytorch-CycleGAN-and-pix2pix/photo.sh"};
Process proc = Runtime.getRuntime().exec(args);
java如何改变conda的环境?比如使用源代码激活xxx???你知道吗
我通过将python设置为/home/cery/anaconda3/bin/python来解决这个问题。我想这是由于环境与康达和系统的冲突造成的
相关问题 更多 >
编程相关推荐