- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在使用 pip 在我的 Ubuntu 18.04 机器上安装包 mlpy:
已安装所有要求,但出现以下编译错误。我也试过直接下载包并通过它安装,我得到的错误是一样的。
mlpy 包版本:0.1.0 和 python 版本是 3.6
命令如下:
pip3 install mlpy
我尝试使用 mlpy 包中的 setup.py 安装
pyhton3 setup.py install
处理消息如下:
Collecting mlpy
Downloading https://files.pythonhosted.org/packages/93/3c/be8ccff2aa3e5ce3b922cff026aadc62d3a671168e42616b1e0b8eccba12/mlpy-0.1.0.tar.gz (4.4MB)
Requirement already satisfied: matplotlib in /usr/local/lib/python3.6/dist-packages (from mlpy)
Requirement already satisfied: numpy>=1.6.2 in /usr/local/lib/python3.6/dist-packages (from mlpy)
Requirement already satisfied: scikit-learn in /usr/local/lib/python3.6/dist-packages (from mlpy)
Requirement already satisfied: scipy>=0.11 in /usr/local/lib/python3.6/dist-packages (from mlpy)
Requirement already satisfied: six>=1.9.0 in /usr/lib/python3/dist-packages (from mlpy)
Requirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.6/dist-packages (from matplotlib->mlpy)
Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.6/dist-packages (from matplotlib->mlpy)
Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.6/dist-packages (from matplotlib->mlpy)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python3.6/dist-packages (from matplotlib->mlpy)
Requirement already satisfied: pytz in /usr/lib/python3/dist-packages (from matplotlib->mlpy)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from kiwisolver>=1.0.1->matplotlib->mlpy)
Installing collected packages: mlpy
Running setup.py install for mlpy: started
Running setup.py install for mlpy: finished with status 'error'
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-l2ob_og8/mlpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-anrvg2fg-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/mlpy
copying mlpy/__init__.py -> build/lib.linux-x86_64-3.6/mlpy
running egg_info
writing mlpy.egg-info/PKG-INFO
writing dependency_links to mlpy.egg-info/dependency_links.txt
writing requirements to mlpy.egg-info/requires.txt
writing top-level names to mlpy.egg-info/top_level.txt
reading manifest file 'mlpy.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.sdf' found under directory 'mlpy/libs'
warning: no previously-included files matching '*.sln' found under directory 'mlpy/libs'
warning: no previously-included files matching '*.suo' found under directory 'mlpy/libs'
warning: no previously-included files matching '*.exp' found under directory 'mlpy/libs'
warning: no previously-included files matching '*.ilk' found under directory 'mlpy/libs'
warning: no previously-included files matching '*.lib' found under directory 'mlpy/libs'
warning: no previously-included files matching '*pdb' found under directory 'mlpy/libs'
warning: no previously-included files matching '__pycache__' found under directory '*'
no previously-included directories found matching 'mlpy/libs/classifier/classifier'
no previously-included directories found matching 'mlpy/libs/hmmc/hmmc'
no previously-included directories found matching 'docs/build'
no previously-included directories found matching 'docs/generated'
writing manifest file 'mlpy.egg-info/SOURCES.txt'
creating build/lib.linux-x86_64-3.6/mlpy/agents
copying mlpy/agents/__init__.py -> build/lib.linux-x86_64-3.6/mlpy/agents
copying mlpy/agents/fsm.py -> build/lib.linux-x86_64-3.6/mlpy/agents
copying mlpy/agents/modules.py -> build/lib.linux-x86_64-3.6/mlpy/agents
copying mlpy/agents/world.py -> build/lib.linux-x86_64-3.6/mlpy/agents
creating build/lib.linux-x86_64-3.6/mlpy/auxiliary
copying mlpy/auxiliary/__init__.py -> build/lib.linux-x86_64-3.6/mlpy/auxiliary
copying mlpy/auxiliary/array.py -> build/lib.linux-x86_64-3.6/mlpy/auxiliary
copying mlpy/auxiliary/datasets.py -> build/lib.linux-x86_64-3.6/mlpy/auxiliary
copying mlpy/auxiliary/datastructs.py -> build/lib.linux-x86_64-3.6/mlpy/auxiliary
copying mlpy/auxiliary/io.py -> build/lib.linux-x86_64-3.6/mlpy/auxiliary
copying mlpy/auxiliary/misc.py -> build/lib.linux-x86_64-3.6/mlpy/auxiliary
copying mlpy/auxiliary/plotting.py -> build/lib.linux-x86_64-3.6/mlpy/auxiliary
creating build/lib.linux-x86_64-3.6/mlpy/cluster
copying mlpy/cluster/__init__.py -> build/lib.linux-x86_64-3.6/mlpy/cluster
copying mlpy/cluster/vq.py -> build/lib.linux-x86_64-3.6/mlpy/cluster
creating build/lib.linux-x86_64-3.6/mlpy/constants
copying mlpy/constants/__init__.py -> build/lib.linux-x86_64-3.6/mlpy/constants
copying mlpy/constants/_constants.py -> build/lib.linux-x86_64-3.6/mlpy/constants
creating build/lib.linux-x86_64-3.6/mlpy/environments
copying mlpy/environments/__init__.py -> build/lib.linux-x86_64-3.6/mlpy/environments
copying mlpy/environments/gridworld.py -> build/lib.linux-x86_64-3.6/mlpy/environments
copying mlpy/environments/nao.py -> build/lib.linux-x86_64-3.6/mlpy/environments
creating build/lib.linux-x86_64-3.6/mlpy/environments/webots
creating build/lib.linux-x86_64-3.6/mlpy/environments/webots/controllers
creating build/lib.linux-x86_64-3.6/mlpy/environments/webots/controllers/serverc
copying mlpy/environments/webots/controllers/serverc/serverc.py -> build/lib.linux-x86_64-3.6/mlpy/environments/webots/controllers/serverc
creating build/lib.linux-x86_64-3.6/mlpy/experiments
copying mlpy/experiments/__init__.py -> build/lib.linux-x86_64-3.6/mlpy/experiments
copying mlpy/experiments/task.py -> build/lib.linux-x86_64-3.6/mlpy/experiments
creating build/lib.linux-x86_64-3.6/mlpy/knowledgerep
copying mlpy/knowledgerep/__init__.py -> build/lib.linux-x86_64-3.6/mlpy/knowledgerep
creating build/lib.linux-x86_64-3.6/mlpy/knowledgerep/cbr
copying mlpy/knowledgerep/cbr/__init__.py -> build/lib.linux-x86_64-3.6/mlpy/knowledgerep/cbr
copying mlpy/knowledgerep/cbr/engine.py -> build/lib.linux-x86_64-3.6/mlpy/knowledgerep/cbr
copying mlpy/knowledgerep/cbr/features.py -> build/lib.linux-x86_64-3.6/mlpy/knowledgerep/cbr
copying mlpy/knowledgerep/cbr/methods.py -> build/lib.linux-x86_64-3.6/mlpy/knowledgerep/cbr
copying mlpy/knowledgerep/cbr/similarity.py -> build/lib.linux-x86_64-3.6/mlpy/knowledgerep/cbr
creating build/lib.linux-x86_64-3.6/mlpy/learners
copying mlpy/learners/__init__.py -> build/lib.linux-x86_64-3.6/mlpy/learners
creating build/lib.linux-x86_64-3.6/mlpy/learners/offline
copying mlpy/learners/offline/__init__.py -> build/lib.linux-x86_64-3.6/mlpy/learners/offline
copying mlpy/learners/offline/irl.py -> build/lib.linux-x86_64-3.6/mlpy/learners/offline
creating build/lib.linux-x86_64-3.6/mlpy/learners/online
copying mlpy/learners/online/__init__.py -> build/lib.linux-x86_64-3.6/mlpy/learners/online
copying mlpy/learners/online/rl.py -> build/lib.linux-x86_64-3.6/mlpy/learners/online
creating build/lib.linux-x86_64-3.6/mlpy/libs
copying mlpy/libs/__init__.py -> build/lib.linux-x86_64-3.6/mlpy/libs
copying mlpy/libs/classifier.pyd -> build/lib.linux-x86_64-3.6/mlpy/libs
copying mlpy/libs/hmmc.pyd -> build/lib.linux-x86_64-3.6/mlpy/libs
copying mlpy/libs/noconflict.py -> build/lib.linux-x86_64-3.6/mlpy/libs
creating build/lib.linux-x86_64-3.6/mlpy/libs/classifier
copying mlpy/libs/classifier/array_helper.cc -> build/lib.linux-x86_64-3.6/mlpy/libs/classifier
copying mlpy/libs/classifier/array_helper.h -> build/lib.linux-x86_64-3.6/mlpy/libs/classifier
copying mlpy/libs/classifier/c45tree.cc -> build/lib.linux-x86_64-3.6/mlpy/libs/classifier
copying mlpy/libs/classifier/c45tree.h -> build/lib.linux-x86_64-3.6/mlpy/libs/classifier
copying mlpy/libs/classifier/classifier.cc -> build/lib.linux-x86_64-3.6/mlpy/libs/classifier
copying mlpy/libs/classifier/classifier.h -> build/lib.linux-x86_64-3.6/mlpy/libs/classifier
copying mlpy/libs/classifier/classifier_module.cc -> build/lib.linux-x86_64-3.6/mlpy/libs/classifier
copying mlpy/libs/classifier/classifier_module.h -> build/lib.linux-x86_64-3.6/mlpy/libs/classifier
copying mlpy/libs/classifier/coord.cc -> build/lib.linux-x86_64-3.6/mlpy/libs/classifier
copying mlpy/libs/classifier/coord.h -> build/lib.linux-x86_64-3.6/mlpy/libs/classifier
copying mlpy/libs/classifier/random.cc -> build/lib.linux-x86_64-3.6/mlpy/libs/classifier
copying mlpy/libs/classifier/random.h -> build/lib.linux-x86_64-3.6/mlpy/libs/classifier
creating build/lib.linux-x86_64-3.6/mlpy/libs/hmmc
copying mlpy/libs/hmmc/hmm.c -> build/lib.linux-x86_64-3.6/mlpy/libs/hmmc
copying mlpy/libs/hmmc/hmm.h -> build/lib.linux-x86_64-3.6/mlpy/libs/hmmc
copying mlpy/libs/hmmc/hmmc_module.c -> build/lib.linux-x86_64-3.6/mlpy/libs/hmmc
copying mlpy/libs/hmmc/hmmc_module.h -> build/lib.linux-x86_64-3.6/mlpy/libs/hmmc
creating build/lib.linux-x86_64-3.6/mlpy/mdp
copying mlpy/mdp/__init__.py -> build/lib.linux-x86_64-3.6/mlpy/mdp
copying mlpy/mdp/discrete.py -> build/lib.linux-x86_64-3.6/mlpy/mdp
copying mlpy/mdp/distrib.py -> build/lib.linux-x86_64-3.6/mlpy/mdp
copying mlpy/mdp/stateaction.py -> build/lib.linux-x86_64-3.6/mlpy/mdp
creating build/lib.linux-x86_64-3.6/mlpy/mdp/continuous
copying mlpy/mdp/continuous/__init__.py -> build/lib.linux-x86_64-3.6/mlpy/mdp/continuous
copying mlpy/mdp/continuous/casml.py -> build/lib.linux-x86_64-3.6/mlpy/mdp/continuous
creating build/lib.linux-x86_64-3.6/mlpy/modules
copying mlpy/modules/__init__.py -> build/lib.linux-x86_64-3.6/mlpy/modules
copying mlpy/modules/patterns.py -> build/lib.linux-x86_64-3.6/mlpy/modules
creating build/lib.linux-x86_64-3.6/mlpy/optimize
copying mlpy/optimize/__init__.py -> build/lib.linux-x86_64-3.6/mlpy/optimize
copying mlpy/optimize/algorithms.py -> build/lib.linux-x86_64-3.6/mlpy/optimize
copying mlpy/optimize/utils.py -> build/lib.linux-x86_64-3.6/mlpy/optimize
creating build/lib.linux-x86_64-3.6/mlpy/planners
copying mlpy/planners/__init__.py -> build/lib.linux-x86_64-3.6/mlpy/planners
copying mlpy/planners/discrete.py -> build/lib.linux-x86_64-3.6/mlpy/planners
creating build/lib.linux-x86_64-3.6/mlpy/planners/explorers
copying mlpy/planners/explorers/__init__.py -> build/lib.linux-x86_64-3.6/mlpy/planners/explorers
copying mlpy/planners/explorers/discrete.py -> build/lib.linux-x86_64-3.6/mlpy/planners/explorers
creating build/lib.linux-x86_64-3.6/mlpy/search
copying mlpy/search/__init__.py -> build/lib.linux-x86_64-3.6/mlpy/search
copying mlpy/search/informed.py -> build/lib.linux-x86_64-3.6/mlpy/search
creating build/lib.linux-x86_64-3.6/mlpy/stats
copying mlpy/stats/__init__.py -> build/lib.linux-x86_64-3.6/mlpy/stats
copying mlpy/stats/_conditional.py -> build/lib.linux-x86_64-3.6/mlpy/stats
copying mlpy/stats/_discrete.py -> build/lib.linux-x86_64-3.6/mlpy/stats
copying mlpy/stats/_multivariate.py -> build/lib.linux-x86_64-3.6/mlpy/stats
copying mlpy/stats/_stats.py -> build/lib.linux-x86_64-3.6/mlpy/stats
creating build/lib.linux-x86_64-3.6/mlpy/stats/dbn
copying mlpy/stats/dbn/__init__.py -> build/lib.linux-x86_64-3.6/mlpy/stats/dbn
copying mlpy/stats/dbn/hmm.py -> build/lib.linux-x86_64-3.6/mlpy/stats/dbn
creating build/lib.linux-x86_64-3.6/mlpy/stats/models
copying mlpy/stats/models/__init__.py -> build/lib.linux-x86_64-3.6/mlpy/stats/models
copying mlpy/stats/models/_basic.py -> build/lib.linux-x86_64-3.6/mlpy/stats/models
copying mlpy/stats/models/mixture.py -> build/lib.linux-x86_64-3.6/mlpy/stats/models
creating build/lib.linux-x86_64-3.6/mlpy/tools
copying mlpy/tools/__init__.py -> build/lib.linux-x86_64-3.6/mlpy/tools
copying mlpy/tools/configuration.py -> build/lib.linux-x86_64-3.6/mlpy/tools
copying mlpy/tools/log.py -> build/lib.linux-x86_64-3.6/mlpy/tools
copying mlpy/tools/misc.py -> build/lib.linux-x86_64-3.6/mlpy/tools
running build_ext
building 'classifier' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/mlpy
creating build/temp.linux-x86_64-3.6/mlpy/libs
creating build/temp.linux-x86_64-3.6/mlpy/libs/classifier
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.6-EKG1lX/python3.6-3.6.5=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I/usr/include/python3.6m -c mlpy/libs/classifier/classifier_module.cc -o build/temp.linux-x86_64-3.6/mlpy/libs/classifier/classifier_module.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
mlpy/libs/classifier/classifier_module.cc: In function ‘PyObject* initclassifier()’:
mlpy/libs/classifier/classifier_module.cc:33:7: error: ‘Py_InitModule3’ was not declared in this scope
m = Py_InitModule3("classifier", ClassifierMethods, "Classification module");
^~~~~~~~~~~~~~
mlpy/libs/classifier/classifier_module.cc:33:7: note: suggested alternative: ‘Py_Initialize’
m = Py_InitModule3("classifier", ClassifierMethods, "Classification module");
^~~~~~~~~~~~~~
Py_Initialize
mlpy/libs/classifier/classifier_module.cc:34:18: error: return-statement with no value, in function returning ‘PyObject* {aka _object*}’ [-fpermissive]
if (m == NULL) return;
^~~~~~
mlpy/libs/classifier/classifier_module.cc:37:4: error: return-statement with no value, in function returning ‘PyObject* {aka _object*}’ [-fpermissive]
return;
^~~~~~
mlpy/libs/classifier/classifier_module.cc:42:4: error: return-statement with no value, in function returning ‘PyObject* {aka _object*}’ [-fpermissive]
return;
^~~~~~
mlpy/libs/classifier/classifier_module.cc:48:4: error: return-statement with no value, in function returning ‘PyObject* {aka _object*}’ [-fpermissive]
return;
^~~~~~
mlpy/libs/classifier/classifier_module.cc:53:4: error: return-statement with no value, in function returning ‘PyObject* {aka _object*}’ [-fpermissive]
return;
^~~~~~
mlpy/libs/classifier/classifier_module.cc:58:4: error: return-statement with no value, in function returning ‘PyObject* {aka _object*}’ [-fpermissive]
return;
^~~~~~
mlpy/libs/classifier/classifier_module.cc:63:4: error: return-statement with no value, in function returning ‘PyObject* {aka _object*}’ [-fpermissive]
return;
^~~~~~
mlpy/libs/classifier/classifier_module.cc:68:2: warning: control reaches end of non-void function [-Wreturn-type]
}
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-l2ob_og8/mlpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-anrvg2fg-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-l2ob_og8/mlpy/
最佳答案
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
mlpy-3.5.0
https://sourceforge.net/projects/mlpy/files/ → 发布日期 = 2012-03-12 → 将使用旧版 gcc、g++。
sudo apt install g++ g++-5 libgsl-dev
tar xvf mlpy-3.5.0.tar.gz
cd mlpy-3.5.0/
export CC=gcc-5 CXX=g++-5 && python3 setup.py build && sudo python3 setup.py install
没有错误。
关于linux - Python3 mlpy 安装错误 - ‘Py_InitModule3’ 未在此范围内声明,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50323877/
我是 mlpy 库的新手,正在寻找实现句子分类的最佳方法。我正在考虑使用 mply 基本感知器来做到这一点,但根据我的理解,它使用预定义的向量大小,但我需要在机器学习时动态增加向量的大小,因为我不想创
我正在尝试通过 DTW 获取下面显示的这两个阵列之间的距离。 我正在使用提供的 Python mlpy 包 dist, cost, path = mlpy.dtw_std(y1, y2, dist_o
作为动态时间规整 (DTW) 的新手,我找到了它的 Python 实现 mlpy.dtw没有在非常详细的扩展中记录。我对它的返回值有一些疑问。 关于返回值dist?我有两个问题: 这里有错字吗?对于标
我正在使用 pip 在我的 Ubuntu 18.04 机器上安装包 mlpy: 已安装所有要求,但出现以下编译错误。我也试过直接下载包并通过它安装,我得到的错误是一样的。 mlpy 包版本:0.1.0
很难说出这里要问什么。这个问题模棱两可、含糊不清、不完整、过于宽泛或夸夸其谈,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开,visit the help center . 关闭 1
我想知道是否有任何方法可以在 python 中为 mlpy 提供 scipy.sparse.csc_matrix 格式。我以前使用过 mlpy 并且一直处理非稀疏矩阵。例如,如果我每行有 5 个特征和
MlPy/SciPy 可以用在 GAE 上吗? 我相信我已经正确导入了 NumPy,因为到目前为止它没有引发任何错误(GAE 1.6 附带了对 NumPy 的支持)。但是,根据我的阅读,我仍然需要导入
我是一名优秀的程序员,十分优秀!