我试图导入“枚举”,但我得到一个导入错误,说它找不到它。 但它就在那里。你知道吗
(cvnano) joev2@joev2-desktop:~/pylibfreenect2$ sudo python
selective_streams.py
Traceback (most recent call last):
File "selective_streams.py", line 8, in
<module>
from pylibfreenect2 import Freenect2,
SyncMultiFrameListener
File
"/home/joev2/pylibfreenect2/pylibfreenect2/__i n it__.py", line 15, in
<module>
import enum
ImportError: No module named enum
但当我这么做的时候,它显示了它的存在
(cvnano) joev2@joev2-desktop:~/pylibfreenect2$ python
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from enum import IntEnum
>>>
有什么想法吗? 我在一个虚拟的环境中工作,如果这有帮助的话。你知道吗
根据virtualenv docs:
因此,如果运行set显式路径到virtualenv的python可执行文件:
然后用sudo权限运行virtualenv的Python。你知道吗
但是,有一个caveat:
相关问题 更多 >
编程相关推荐