-
Notifications
You must be signed in to change notification settings - Fork 60
Issue when both python2 and python3 installed #30
Comments
Do you build from source or via PyPI? |
via PyPI |
@chaonan99 Thanks for the feedback. If we build from source, the PYTHON_BINARY = '/Users/zihao.zzh/anaconda2/envs/tensorboard/bin/python'
if IsWindows() and not PYTHON_BINARY.endswith('.exe'):
PYTHON_BINARY = PYTHON_BINARY + '.exe' When in PyPI, as we use machines from Travis, the 'Bazel does not support execution of Python interpreters via labels yet')
elif PYTHON_BINARY.startswith('/'):
# Case 2: Absolute path.
- return PYTHON_BINARY
+ if os.path.exists(PYTHON_BINARY):
+ # file exists
+ return PYTHON_BINARY
+ else:
+ # not exist, have to search. often occurs in travis-built wheel.
+ return SearchPath('python')
elif '/' in PYTHON_BINARY:
# Case 3: Path is relative to current working directory.
return os.path.join(os.getcwd(), PYTHON_BINARY) |
I guess the |
@chaonan99 I've fixed the I would make a new PR for this issue later. |
@chaonan99 @zihaolucky Is this solved? I'm having the same trouble.I have python 2.7 and 3.6, and I installed tensorflow using pip3. Can you please give simple instructions to deal with this? Thanks! |
I've encountered a issue when both python2 and 3 are installed on the same machine but tensorboard is installed via python3. (Typically python2 is called via
python
and python3 viapython3
in this situation.) ButFindPythonBinary
function won't realize that now. Currently I just hacked into the script and force it to search python3, but I believe there is a better way.Error message below:
The text was updated successfully, but these errors were encountered: