- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
所以,我猜这是其中一个相关数据包中的错误,我想报告它,但我真的不明白错误到底在哪里,所以我试图定义它并描述解决方案。
我最近升级到 Ubuntu 14.4 并且很高兴能够以我自己的语言使用它,当我遇到错误时,这是由于语言更改:
尝试使用 distutils
编译 cython .pyx
文件时,如果文件位于某个路径中,则编译会因 unicode 错误 中止,其中包括非 ascii 符号。在我的例子中,桌面路径已重命名为德语版本 "Arbeitsfläche"
,编译时似乎存在问题。
谁能告诉我这是一个错误还是一个功能(如果是前者,在哪里提交)?
完整性堆栈跟踪:
Compiler crash traceback from this point on:
File "/usr/lib/python2.7/dist-packages/Cython/Compiler/Nodes.py", line 6785, in analyse_declarations
module_scope = env.find_module(self.module_name, self.pos)
File "/usr/lib/python2.7/dist-packages/Cython/Compiler/Symtab.py", line 1089, in find_module
module_name, relative_to = self.parent_module, pos = pos)
File "/usr/lib/python2.7/dist-packages/Cython/Compiler/Main.py", line 132, in find_module
pxd_pathname = self.find_pxd_file(qualified_name, pos)
File "/usr/lib/python2.7/dist-packages/Cython/Compiler/Main.py", line 184, in find_pxd_file
pxd = self.search_include_directories(qualified_name, ".pxd", pos, sys_path=True)
File "/usr/lib/python2.7/dist-packages/Cython/Compiler/Main.py", line 225, in search_include_directories
tuple(self.include_directories), qualified_name, suffix, pos, include, sys_path)
File "/usr/lib/python2.7/dist-packages/Cython/Utils.py", line 16, in wrapper
res = cache[args] = f(*args)
File "/usr/lib/python2.7/dist-packages/Cython/Utils.py", line 101, in search_include_directories
path = os.path.join(dir, dotted_filename)
File "/usr/lib/python2.7/posixpath.py", line 80, in join
path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 23: ordinal not in range(128)
编辑 18.8.2014
可以找到一个最小的例子here .似乎 import cython
语句触发了该行为。
最佳答案
我已经成功编译了 your example在我将参数替换为 setup
ext_modules=linext,
cmdclass = {'build_ext': build_ext}
使用 current cython documentation 中鼓励的版本:
ext_modules=cythonize(linext)
根据您找到版本的位置,Cython 中确实存在错误,或者您只是尝试了一些不起作用的东西。
关于python - 在非英语 Ubuntu 上编译 Cython .pyx 文件(unicode 错误),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25141838/
我正在尝试构建一个包含 *.pyx 文件的 Python 包 (pyregion),但在构建过程中出现错误。查看以下输出: $ python setup.py build running build
两个pyx文件, f1.pyx cpdef double func1(): return 0.01 f2.pyx from f1 cimport func1 我如何导入 func1来自 f1
似乎PyCharm中的python类型检查器自动适用于.py文件..但不适用于.pyx文件。 有什么方法可以在PyCharm中为.pyx文件启用类型检查器吗? 另外,有什么方法可以将mypy与cyth
我的 pyx 依赖于本地库 我怎样才能pyximport.install()它? pyxinstall 中的自动构建不知道与 native 库链接,因此构建失败... 最佳答案 您还可以使用 .pyx
我正在玩 cython 教程 ( http://docs.cython.org/en/latest/src/tutorial/cython_tutorial.html ) 我有一个这样的目录: som
许多可视化库和语言提供了生成任何颜色的简单方法。例如,您可以简单地添加一个带有 css 颜色代码的样式标签,以在 html 中设置对象的颜色。 是否有类似的方法可以将 pyx 绘图的颜色设置为任何想要
我是 python 的初学者,我也刚刚熟悉 cython。我在 Windows 64 位上使用 Anaconda。我正在尝试按如下方式运行“helloworld”示例: 1- 我构建了一个 hello
如何使用 Pyx 在任意两个点之间绘制一条“支撑”线? 它看起来像这样: Brace example http://tof.canardpc.com/view/d16770a8-0fc6-4e9d-b
我在运行 python 脚本时遇到错误“找不到 parser.pyx:找不到文件”,路径是当前工作目录 +“pandas_libs\parsers.pyx”。我找不到为什么 VsCode 引用 wkd
我只是想得到一个图表,但轴上没有任何数字。比方说: from math import pi from pyx import * g = graph.graphxy(width=8) g.plot(gr
使用此方法编译pyx文件: import pyximport pyximport.install() 执行以下操作后,.pyx 文件不会重新编译和重新加载: pyximport.install() i
我一直在尝试使用 PyX 将太阳的天文符号放在图表上,但没有成功。我的代码如下: from pyx import * from pylab import * x=arange(1,5,0.1)
这个问题在这里已经有了答案: Collapse multiple submodules to one Cython extension (5 个答案) 关闭 2 年前。 我有多个 .pyx 文件,有
我正在尝试在 Python 中的 PyX 模块中运行。 这是一个名为“mplot.py”的简单程序: from pyx import * g = graph.graphxy(width=8) g
我在 cython 中得到了代表 2 个类的 3 个文件: 1. ../src/cython/class1.pyx 2. ../src/cython/class1.pxd 3. ../src/cyth
在我手中,我有一个 .pyc,而不是相应的 .py 或 .pyx。 是否可以对 .pyc 进行 cythonize ? 是否应该先解压为.py,如何解压? 最佳答案 Cython 是 Python 的
我有一组 UTF-8 字符,我想将其插入 PyX 生成的 pdf 文件中。我已将 # -*-coding: utf-8 -*- 添加到文件顶部。代码有点类似于以下内容: # -*- coding: u
我正在尝试从我的 python 源文件创建一个 unix 可执行文件。 我有两个文件,p1.py和p2.py p1.py:- from p2 import test_func print (test_
我正在尝试在 python 3.6 中使用 scapy 来解析 pcap 文件,我正在尝试使用的功能之一是 pdfdump。 from scapy.all import * packets = rdp
pip 知道 pyx 包: $ pip search pyx PyX - Python package for the generation of PostScript and PDF files 尝
我是一名优秀的程序员,十分优秀!