Closed
Description
Bug report
Bug summary
Unable to import matplotlib in Windows 10 due to a missing module `pwd', and unable to install pwd for Windows.
Code for reproduction
import matplotlib
Actual outcome
This is the traceback received after attempting import
Traceback (most recent call last):\r: C:/rs/test.py
File "C:/rs/test.py", line 85, in <module>\r: C:/rs/test.py
from dateplot import dateplot as dp\r: C:/rs/test.py
File "C:\\rs\\dateplot.py", line 1, in <module>\r: C:/rs/test.py
import matplotlib\r: C:/rs/test.py
File "C:\\Python36\\lib\\site-packages\\matplotlib\\__init__.py", line 1182, in <module>\r: C:/rs/test.py
rcParams = rc_params()\r: C:/rs/test.py
File "C:\\Python36\\lib\\site-packages\\matplotlib\\__init__.py", line 1015, in rc_params\r: C:/rs/test.py
fname = matplotlib_fname()\r: C:/rs/test.py
File "C:\\Python36\\lib\\site-packages\\matplotlib\\__init__.py", line 825, in matplotlib_fname\r: C:/rs/test.py
configdir = _get_configdir()\r: C:/rs/test.py
File "C:\\Python36\\lib\\site-packages\\matplotlib\\__init__.py", line 680, in _get_configdir\r: C:/rs/test.py
return _get_config_or_cache_dir(_get_xdg_config_dir())\r: C:/rs/test.py
File "C:\\Python36\\lib\\site-packages\\matplotlib\\__init__.py", line 657, in _get_config_or_cache_dir\r: C:/rs/test.py
return _create_tmp_config_dir()\r: C:/rs/test.py
File "C:\\Python36\\lib\\site-packages\\matplotlib\\__init__.py", line 583, in _create_tmp_config_dir\r: C:/rs/test.py
username = getpass.getuser()\r: C:/rs/test.py
File "C:\\Python36\\lib\\getpass.py", line 168, in getuser\r: C:/rs/test.py
import pwd\r: C:/rs/test.py
ModuleNotFoundError: No module named 'pwd'\r: C:/rs/test.py
Expected outcome
It is expected that this should just import normally with no issue, or that pwd should work with Windows.
Matplotlib version
- Operating System: Windows 10 64bit
- Matplotlib Version: 2.0.2
- Python Version: 3.6
- Jupyter Version (if applicable):
- Other Libraries:
- pwd (n/a)
- cgi (built in)
installed matplotlib via pip