How to install tensorflow with virtualenvwrapper o

2019-06-14 05:49发布

I need to install TensorFlow on macOS-Sierra and I want to use virtualenvwrapper for that. To install TensorFlow one could follow the virtualenv installation walk-through provided by TensorFlow website. However, I want to do that with virtualenvwrapper that can be installed like so.

Could someone who has experience with this guide me through?

1条回答
兄弟一词,经得起流年.
2楼-- · 2019-06-14 06:34

First I would install virtualenv and virtualenvwrapper:

$pip install virtualenv
$pip install virtualenvwrapper

Then I would create a directory for my virtualenvs.

$mkdir ~/.virtualenvs

Then I would update my .bashrc file:

#put these lines in your .bashrc file
export WORKON_HOME=~/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh

Then source .bashrc:

$source .bashrc

Then create my virtual environment:

$mkvirtualenv my-virtual-environment --system-site-packages target-directory

To activate the virtual environment and install tensorflow:

$workon my-virtual-environment
(my-virtual-environment)$pip install --upgrade tensorflow

I hope this helps. It's been a while since I've been a regular OSX user. If this doesn't work for you, keep this updated and I might be able to help more.

查看更多
登录 后发表回答