![]() Package plan for installation in environment /opt/anaconda3: Installing TensorFlow is easy: # conda install tensorflow-gpu In fact, Conda provides TensorFlow packages in its default channel / repository! As of this writing, the latest TensorFlow version in the default channel is 1.3.0, which is slightly behind the latest official release of TensorFlow (1.4.0). Then remove the conda environment: $ conda env remove -n tensorflow Proper way of installing TensorFlow with Anaconda Let’s deactivate the conda environment: (tensorflow) ~]$ source deactivate It’s not worth our time to investigate further. The OpenBLAS libraries are presumably located in /usr/local/lib. However, this numpy module is not built with MKL, but rather with OpenBLAS! (tensorflow)$ python ![]() In the above output we note that numpy was also installed in the conda environment, as a dependency of TensorFlow. home/dong/.conda/envs/tensorflow/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.5 of module '_tensor_util' does not match runtime version 3.6Īpparently, the module was compiled against the wrong Python version! Admittedly, it might work to install TensorFlow this way with earlier Python versions, such as 2.7 and 3.5 but not with 3.6! However, when I tried to import the tensorflow module, I got an error: (tensorflow)$ python Let’s follow the instructions step-by-step.ġ) We’ve already downloaded and installed Anaconda.Ģ) Create a conda environment named tensorflow to run Python 3.6 (as an unprivileged user): $ module load pythonģ) Activate the conda environment: $ source activate tensorflowĤ) Install the latest TensorFlow release (1.4.0 as of this writing) inside the conda environment: (tensorflow)$ pip install -ignore-installed -upgrade Include_dirs = Incorrect way of installing TensorFlow with Anacondaīefore I show you the proper way of installing TensorFlow with Anaconda, I’d like to point out that there are a couple of deficiencies in the official TensorFlow documentation on Installing with Anaconda. ![]() Type "help", "copyright", "credits" or "license" for more information.ĭefine_macros = One crucial reason that Anaconda Python provides much higher performance than the stock Python is that it uses the highly optimized Intel MKL for some of most popular numerical/scientific Python libraries, including NumPy, SciPy & Scikit-Learn: $ python Note here we use module to facilitate the usage of multiple Python distributions on Hydra. I chose to install it at system location /opt/anaconda2 and thus made it available to all users.Ĥ) Update Anaconda 2: # module swap python/anaconda3 python/anaconda2 ![]() The default install location is $HOME/anaconda2, so any user can install a private copy. I chose to install it at system location /opt/anaconda3 and thus made it available to all users.Ģ) Update Anaconda 3: # conda update condaģ) Download the latest Anaconda2 for Linux Installer (v5.0.1 as of this writing) and install it: # wget The default install location is $HOME/anaconda3, so any user can install a private copy. One should use Anaconda Python, rather than the stock Python that comes with your Linux distros, for any serious computation.ġ) Download the latest Anaconda3 for Linux Installer (v5.0.1 as of this writing) and install it: # wget Anaconda provides high performance computing with:
0 Comments
Leave a Reply. |