We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 21b93c3 commit 6e41382Copy full SHA for 6e41382
python/paddle/dataset/image.py
@@ -39,10 +39,12 @@
39
if six.PY3:
40
import subprocess
41
import sys
42
- if sys.platform == 'win32':
43
- interpreter = sys.exec_prefix + "\\" + "python.exe"
44
- else:
45
- interpreter = sys.executable
+ import os
+ interpreter = sys.executable
+ # Note(zhouwei): if use Python/C 'PyRun_SimpleString', 'sys.executable'
+ # will be the C++ execubable on Windows
46
+ if sys.platform == 'win32' and 'python.exe' not in interpreter:
47
+ interpreter = sys.exec_prefix + os.sep + 'python.exe'
48
import_cv2_proc = subprocess.Popen(
49
[interpreter, "-c", "import cv2"],
50
stdout=subprocess.PIPE,
0 commit comments