远程使用服务器
服务器 + jupyter notebook
- jupyter 没有python3
参考:Jupyter notebook 里面没有python3怎么办? 我帮您!
出现的问题:pip3没法安装。 - pip3安装:
显示pip3安装成功,但是却无法使用。实际上是没有正确安装。
sudo apt-get remove python3-pip; sudo apt-get install python3-pip
参考:sudo apt-get remove python3-pip; sudo apt-get install python3-pip
服务器+pycharm远程连接
- 查看python3’s interpret的位置:which python3 参考:linux 查看python安装路径,版本号
Jupyter + tensorflow
错误:
ImportError: Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory
Failed to load the native TensorFlow runtime.
应该用python3才对,但是这里用的时python2.和同学交流后,决定用虚拟环境。
使用anaconda
- linux 安装 anaconda Linux安装anaconda
- anacoda设置虚拟环境 使用Anacoda设置Tensorflow的虚拟环境
- 重新安装jupyter
pip3 install ipykernel
python3 -m ipykernel install --user tersorflow_gpuenv(不限定名字但是建议和虚拟环境名字相同)
或者直接用conda安装
conda install jupyter
linux安装anaconda
SCP + 服务器之间 + publickey
scp -i ~/.ssh/id_rsa (-r) 需要传输的文件地址 root@remote_ip:/拷贝的地址
Linux 各种包不全
- ImportError: No module named ‘google’
情景:import tensorflow的时候出现该错
解决方法:pip3 install protobuf - pip3已安装但是无法使用-> 安装出现了错误,移除后重新安装即可。