加载一个pickle文件failes寻找pyproj?

时间:2017-04-18 22:10:33

标签: python anaconda pickle pyproj

在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

到目前为止,我已经完成了我能想到的事情。建议?

0 个答案:

没有答案