gpt4 book ai didi

python - 橙色 3 : ImportError: cannot import name '_variable'

转载 作者:太空宇宙 更新时间:2023-11-04 05:17:21 26 4
gpt4 key购买 nike

我正尝试在我的 Mac 上使用 Orange3,但出现此错误:ImportError: cannot import name '_variable'

这是我的设置:

$ cd orange_playground
$ virtualenv -p python3 venv
$ pip install orange3
$ source venv/bin/activate
$ python

输出如下:

Python 3.4.2 (default, Oct  8 2014, 19:29:52)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.51)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import Orange
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "orange_playground/venv/lib/python3.4/site-packages/Orange/__init__.py", line 11, in <module>
from .misc.lazy_module import _LazyModule
File "orange_playground/venv/lib/python3.4/site-packages/Orange/misc/__init__.py", line 3, in <module>
from .distmatrix import DistMatrix
File "orange_playground/venv/lib/python3.4/site-packages/Orange/misc/distmatrix.py", line 3, in <module>
from Orange.data import Table, StringVariable, Domain
File "orange_playground/venv/lib/python3.4/site-packages/Orange/data/__init__.py", line 4, in <module>
from .variable import *
File "orange_playground/venv/lib/python3.4/site-packages/Orange/data/variable.py", line 11, in <module>
from Orange.data import _variable
ImportError: cannot import name '_variable'

来自 orange_playground/venv/lib/python3.4/site-packages/Orange/data/variable.py 的第一行代码:

import collections
import re

from datetime import datetime, timedelta, timezone
from numbers import Number, Real, Integral
from math import isnan, floor
from pickle import PickleError

import numpy as np

from Orange.data import _variable
from Orange.util import Registry, color_to_hex, hex_to_color

__all__ = ["Unknown", "MISSING_VALUES", "make_variable", "is_discrete_values",
"Value", "Variable", "ContinuousVariable", "DiscreteVariable",
"StringVariable", "TimeVariable"]


# For storing unknowns
Unknown = ValueUnknown = float("nan")
# For checking for unknowns
MISSING_VALUES = {np.nan, "?", "nan", ".", "", "NA", "~", None}

...

有什么想法吗?

最佳答案

Installing Orange3 from source喜欢@MartijnPieters推荐作品!谢谢。

关于python - 橙色 3 : ImportError: cannot import name '_variable' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41370029/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com