1

I am trying to run a program using a module without having to install it. I tried the sys.path instructions from here, but I keep getting this error:

$ python imp.py
Traceback (most recent call last):
  File "imp.py", line 5, in <module>
    import astropy
  File "./moduly/astropy/__init__.py", line 275, in <module>
    _initialize_astropy()
  File "./moduly/astropy/__init__.py", line 241, in _initialize_astropy
    from .utils import _compiler
ImportError: cannot import name _compiler

Please do you have any idea what might be the problem?

4

1 回答 1

2

这对我有帮助

sudo apt-get install python-dev

于 2015-06-24T13:05:44.990 回答