【发布时间】:2017-02-17 18:57:53
【问题描述】:
我正在开发一个运行 Red Hat Enterprise Linus - 6+ 的强大集群。
我需要从另一个目录导入一个库(比如 Tensorflow),但主目录已经包含旧版本的 tensorflow。
结构 -
I Don't have Admin privileges for these libraries
Anaconda-directory
|--- tensorflow 0.7
|--- other libraries which I need
Other Directory
|--- tensorflow 0.11
My Home Directory (I have privileges here)
Local directory of anaconda
|--- Keras
所以,我需要使用 Anaconda 目录,但我想使用 tensorflow (0.11) 的更新版本,我也想使用 Keras。
我尝试了以下命令 -
METHOD - 1
# Load Anaconda module
module load apps/anaconda/4.1.1/gnu
# Has tensorflow 0.7 installed
jupyter notebook
--> Works, but with tensorflow 0.7 (Which is incompatible with keras)
METHOD - 2
# Load new version of tensorflow
# It automatically python module located at compiler/python/2.7.10/compilervars along with CUDAnn and others
module load apps/tensorflow/0.11/gnu
# Point to my local installation of anaconda where I have installed Keras
export PYTHONPATH=/home/-path-to-my-home-dir/anaconda2/lib/python2.7/site-packages/:$PYTHONPATH
echo $PYTHONPATH
/home/-path-to-my-home-dir/anaconda2/lib/python2.7/site-packages/:/home/apps/TENSOR_GPU/0.11/gnu/lib/python2.7/site-packages/
--> Works well in python shell, but I want to use IPython Notebook
jupyter notebook
--> Doesn't work in Ipython Notebook, which I guess is due to the reason that it uses jupyter notebook from my home dir (Not an Admin)
### WHAT I WANT ###
Anaconda Distribution --> From Server Module Directory (Not my local Directory)
Jypyter --> From above anaconda dist (Not my local anaconda dist)
Tensorflow --> From another module (Newer Version)
Keras --> Installed in my local anaconda distribution
# Any Other additional packages
# either not available on server (I can't install on server)
# or older versions available
# For such libraries, I should be able to use just that package
# from my home directory (I can have anaconda installed on my home dir)
【问题讨论】:
标签: python linux path server ipython