1

在 Linux 上运行 Anaconda 2.7.13。代码如下所示:

     import matplotlib
matplotlib.use('Agg')
from mpl_toolkits.basemap import Basemap
from scipy import *
import math
from math import radians, tan, sin, cos, pi, atan, sqrt, pow, asin, acos
import pylab as P
import numpy as np
from numpy import NAN
import sys
import os
import pickle as pl
mapname = "/basemap/2017-04-10_map.pickle"
#map_temp = pl.load(open(mapname, 'rb'))
map_temp = pl.load(open(mapname))

有人抱怨它找不到 pyproj,我已经确认它确实可以通过交互式导入 pickle 和 pyproj 来获得。

错误看起来像:

    Traceback (most recent call last):
  File "sample.py", line 18, in <module>
    map_temp = pickle.load(open(mapname))
  File "/opt/Anaconda/python2/lib/python2.7/pickle.py", line 1384, in load
    return Unpickler(file).load()
  File "/opt/Anaconda/python2/lib/python2.7/pickle.py", line 864, in load
    dispatch[key](self)
  File "/opt/Anaconda/python2/lib/python2.7/pickle.py", line 1096, in load_global
    klass = self.find_class(module, name)
  File "/opt/Anaconda/python2/lib/python2.7/pickle.py", line 1130, in find_class
    __import__(module)
ImportError: No module named pyproj

到目前为止,我已经做了我能想到的。建议?

4

0 回答 0