I have gotten cygwin up and running in windows, and everything seems to be working fine, except for loading python modules.
>>> import requests
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/cygdrive/c/Users/mkupfer/appdata/local/programs/python/python36-32/lib/site-packages/requests/__init__.py", line 44, in <module>
import chardet
ModuleNotFoundError: No module named 'chardet'
And then here is another error I got for numpy which looks a little different.
>>> import numpy
Traceback (most recent call last):
File "/cygdrive/c/Users/mkupfer/appdata/local/programs/python/python36-32/lib/site-packages/numpy/core/__init__.py", line 16, in <module>
from . import multiarray
ImportError: cannot import name 'multiarray'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/cygdrive/c/Users/mkupfer/appdata/local/programs/python/python36-32/lib/site-packages/numpy/__init__.py", line 142, in <module>
from . import add_newdocs
File "/cygdrive/c/Users/mkupfer/appdata/local/programs/python/python36-32/lib/site-packages/numpy/add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "/cygdrive/c/Users/mkupfer/appdata/local/programs/python/python36-32/lib/site-packages/numpy/lib/__init__.py", line 8, in <module>
from .type_check import *
File "/cygdrive/c/Users/mkupfer/appdata/local/programs/python/python36-32/lib/site-packages/numpy/lib/type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "/cygdrive/c/Users/mkupfer/appdata/local/programs/python/python36-32/lib/site-packages/numpy/core/__init__.py", line 26, in <module>
raise ImportError(msg)
ImportError:
Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control). Otherwise reinstall numpy.
Original error was: cannot import name 'multiarray'
I initially thought that this had to do with my sys.path
? But I've added the following to my .bashrc file and still having issues above:
PYTHONPATH="$HOME/appdata/local/programs/python/python36-32/lib/site-packages"
PYTHONPATH="${PYTHONPATH}:$HOME/appdata/local/programs/python/python36-32/lib"
export PYTHONPATH
I've tried the solution to another question here: https://stackoverflow.com/a/32027563/1656488, but that still didn't fix anything. It in fact installed pip3 under my windows user directory and not in cygwin.