我有一个简单的网页,它使用python脚本和cgi来显示一些数据。当我收到以下错误时,我正在尝试导入matplotlib:
C:\wampstack-5.6.24-0\apache2\cgi-bin\makeImage.py in ()
10
11 #For plotting
=> 12 import matplotlib.pyplot as pyplot
13
14 #Setting the image size
matplotlib undefined, pyplot undefined
C:\Program Files (x86)\Python36-32\lib\site-packages\matplotlib\__init__.py in ()
1180
1181 # this is the instance used by the matplotlib classes
=> 1182 rcParams = rc_params()
1183
1184 if rcParams['examples.directory']:
rcParams undefined, rc_params = <function rc_params>
C:\Program Files (x86)\Python36-32\lib\site-packages\matplotlib\__init__.py in rc_params(fail_on_error=False)
1013 default matplotlib rc file.
1014 """
=> 1015 fname = matplotlib_fname()
1016 if not os.path.exists(fname):
1017 # this should never happen, default in mpl-data should always be found
fname undefined, global matplotlib_fname = <function matplotlib_fname>
C:\Program Files (x86)\Python36-32\lib\site-packages\matplotlib\__init__.py in matplotlib_fname()
823 return fname
824
=> 825 configdir = _get_configdir()
826 if configdir is not None:
827 fname = os.path.join(configdir, 'matplotlibrc')
configdir undefined, global _get_configdir = <function _get_configdir>
C:\Program Files (x86)\Python36-32\lib\site-packages\matplotlib\__init__.py in _get_configdir()
678 5. A writable directory could not be found or created; return None.
679 """
=> 680 return _get_config_or_cache_dir(_get_xdg_config_dir())
681
682 get_configdir = verbose.wrap('CONFIGDIR=%s', _get_configdir, always=False)
global _get_config_or_cache_dir = <function _get_config_or_cache_dir>, global _get_xdg_config_dir = <function _get_xdg_config_dir>
C:\Program Files (x86)\Python36-32\lib\site-packages\matplotlib\__init__.py in _get_config_or_cache_dir(xdg_base=None)
655 return p
656
=> 657 return _create_tmp_config_dir()
658
659
global _create_tmp_config_dir = <function _create_tmp_config_dir>
C:\Program Files (x86)\Python36-32\lib\site-packages\matplotlib\__init__.py in _create_tmp_config_dir()
581 return None
582 try:
=> 583 username = getpass.getuser()
584 except KeyError:
585 username = str(os.getuid())
username undefined, getpass = <module 'getpass' from 'C:\\Program Files (x86)\\Python36-32\\lib\\getpass.py'>, getpass.getuser = <function getuser>
C:\Program Files (x86)\Python36-32\lib\getpass.py in getuser()
166
167 # If this fails, the exception will "explain" why
=> 168 import pwd
169 return pwd.getpwuid(os.getuid())[0]
170
pwd undefined
ModuleNotFoundError: No module named 'pwd'
args = ("No module named 'pwd'",)
msg = "No module named 'pwd'"
name = 'pwd'
path = None
with_traceback = <built-in method with_traceback of ModuleNotFoundError object>
当我谷歌pwd它说这是一个Linux的东西,所以最新情况如何?