I have a Azure VM, and my personal computer is MAC OS


import os
os.system(". bin/activate")
os.system("tensorflow/bazel-bin/tensorflow/examples/label_image/label_image --input_layer=Mul --output_layer=final_result --labels=PATH --image=PATH --graph=PATH")

at MAC (Personal Com.)

python3 Predict.py make &> PATH


Not Commandline just write text file

but, Ubuntu(= Azure VM)

python3 Predict.py make &> PATH


python3 result in command line

I want to get same result. What should I do? plz Help me.

  • 1
    This doesn't look like anything I know from linux/unix. Are you sure you are using a linux shell? – Gyro Gearloose Jan 18 '18 at 18:44
  • I Used MAC Terminal (Personal Com.) and Linux Shell(Azure VM). – TG_K Jan 18 '18 at 18:52
  • 1
    It's hard to understand what you're asking, but my guess is the MAC terminal is using bash where &> file is a synonym for > file 2>&1 (i.e. redirected both stdout and stderr to file) whereas you have set your shell to sh (or dash) on Ubuntu where &> file will result in backgrounding the process and writing nothing to file – steeldriver Jan 18 '18 at 18:57
  • Sorry, never heard about azure VM, and when I duck for it I get keywords "microsoft" and "pricing". To get ahead with your question, when you type echo $0 , what do you get? If you are using any common kind of linux shell you should get some answer like bash, or ksh. – Gyro Gearloose Jan 18 '18 at 18:58
  • 1
    Your Predict.py file should be better written as a shell script. These four Python lines hurt my eyes. – Timo Jan 20 '18 at 9:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.