我实际上使用Matplotlib和Numpy作为ssh上的Python脚本.
我必须在我的ssh帐户上创建一个虚拟的python3环境.
然后,我做了: pip3 install numpy
一切运作良好:
Collecting numpy
Using cached https://files.pythonhosted.org/packages/7b/61/11b05cc37ccdaabad89f04dbdc2a02905cf6de6f9b05816dba843beed328/numpy-1.14.3-cp35-cp35m-manylinux1_x86_64.whl
Installing collected packages: numpy
Successfully installed numpy-1.14.3
Run Code Online (Sandbox Code Playgroud)
pip3显示numpy
Name: numpy
Version: 1.14.3
Summary: NumPy: array processing for numbers, strings, records, and objects.
Home-page: http://www.numpy.org
Author: Travis E. Oliphant et al.
Author-email: None
License: BSD
Location: /panhome/me/.local/lib/python3.5/site-packages
Run Code Online (Sandbox Code Playgroud)
然后,在我的脚本中,我把PYTHONPATH这样:
export PYTHONPATH=$PYTHONPATH:/panhome/me/.local/lib/python3.5/site-packages
Run Code Online (Sandbox Code Playgroud)
但我实际上得到以下错误:
Traceback (most recent call last):
File "/pandata/me/LEPIWASP/blast_database/public_scripts-master/Diamond_BLAST_add_taxonomic_info/Diamond_blast_to_taxid.py", line 25, in <module>
import matplotlib
File "/panhome/me/.local/lib/python3.5/site-packages/matplotlib/__init__.py", line 127, in <module>
from . import cbook
File "/panhome/me/.local/lib/python3.5/site-packages/matplotlib/cbook/__init__.py", line 35, in …Run Code Online (Sandbox Code Playgroud)