I on the command line to run python xx. Py is correct, I put the python xx. Py wrote. Sh script, then./xx. Sh, will appear a mistake,
I print the two cases of sys path, found that in both cases the sys. The path is not the same,
Command line, please python and./xx. Sh run in py script, their respective python environment where is respectively set,
CodePudding user response:
As sh scripts inside of py file to write the full pathCodePudding user response:
First, the path to the right, it is better to talk with you performed manually py script directory path consistent,Second, if really have the problem of environment variable, you can be in sh to secure the first line of the script/etc/profile,