2013-07-09 3 views
2

Я хочу, чтобы создать исполняемый файл из pyqtgraph,pyqtgraph скомпилировать в исполняемый файл не удается

, наконец, я попробовал этот учебник

http://www.pyqtgraph.org/Bundling%20applications%20with%20PyQtGraph_R16.pdf

После первого запуска скомпилированного кода в примере учебника говорит, что должно быть сообщение об ошибке, как

Traceback (most recent call last): 
File "simpleApp.pyw", line 6, in <module> 
File "pyqtgraph\__init__.pyc", line 107, in <module> 
File "pyqtgraph\__init__.pyc", line 89, in importAll 
WindowsError: [Error 3] The system cannot find the path specified: 
'D:\\xxxxxx\\SandBox\\src\\dist\\library.zip\\pyqtgraph\\graphicsItems/*.*' 

Но я получил, что

File "pyqtgraph_test.pyw", line 8, in <module> 
File "pyqtgraph\__init__.pyc", line 177, in <module> 
File "pyqtgraph\__init__.pyc", line 167, in importAll 
File "pyqtgraph\__init__.pyc", line 159, in importModules 
Traceback (most recent call last): 
File "pyqtgraph\__init__.pyc", line 155, in importModules 
File "pyqtgraph\graphicsItems\PlotDataItem.pyc", line 4, in <module> 
File "pyqtgraph\graphicsItems\PlotCurveItem.pyc", line 4, in <module> 
File "scipy\stats\__init__.pyc", line 320, in <module> 
File "scipy\stats\stats.pyc", line 246, in <module> 
File "scipy\stats\distributions.pyc", line 16, in <module> 
File "scipy\optimize\__init__.pyc", line 148, in <module> 
File "scipy\optimize\_root.pyc", line 20, in <module> 
File "scipy\optimize\nonlin.pyc", line 122, in <module> 
File "scipy\sparse\__init__.pyc", line 193, in <module> 
File "scipy\sparse\csgraph\__init__.pyc", line 148, in <module> 
File "scipy\sparse\csgraph\_shortest_path.pyc", line 12, in <module> 
File "scipy\sparse\csgraph\_shortest_path.pyc", line 10, in __load 
File "_shortest_path.pyx", line 18, in init scipy.sparse.csgraph._shortest_path     
(scipy\sparse   \csgraph\_shortest_path.c:14224) 
ImportError: No module named _validation 
File "pyqtgraph_test.pyw", line 8, in <module> 
File "pyqtgraph\__init__.pyc", line 177, in <module> 
File "pyqtgraph\__init__.pyc", line 167, in importAll 
File "pyqtgraph\__init__.pyc", line 159, in importModules 
Traceback (most recent call last): 
File "pyqtgraph\__init__.pyc", line 155, in importModules 
File "pyqtgraph\graphicsItems\PlotItem\__init__.pyc", line 1, in <module> 
File "pyqtgraph\graphicsItems\PlotItem\PlotItem.pyc", line 32, in <module> 
File "pyqtgraph\graphicsItems\PlotDataItem.pyc", line 4, in <module> 
File "pyqtgraph\graphicsItems\PlotCurveItem.pyc", line 4, in <module> 
File "scipy\stats\__init__.pyc", line 320, in <module> 
File "scipy\stats\stats.pyc", line 245, in <module> 
ImportError: cannot import name futil 
File "pyqtgraph_test.pyw", line 8, in <module> 
File "pyqtgraph\__init__.pyc", line 177, in <module> 
File "pyqtgraph\__init__.pyc", line 167, in importAll 
File "pyqtgraph\__init__.pyc", line 159, in importModules 
Traceback (most recent call last): 
File "pyqtgraph\__init__.pyc", line 155, in importModules 
File "pyqtgraph\graphicsItems\HistogramLUTItem.pyc", line 10, in <module> 
File "pyqtgraph\graphicsItems\GradientEditorItem.pyc", line 8, in <module> 
File "pyqtgraph\colormap.pyc", line 2, in <module> 
File "scipy\interpolate\__init__.pyc", line 160, in <module> 
File "scipy\interpolate\ndgriddata.pyc", line 10, in <module> 
File "scipy\interpolate\interpnd.pyc", line 12, in <module> 
File "scipy\interpolate\interpnd.pyc", line 10, in __load 
File "interpnd.pyx", line 1, in init scipy.interpolate.interpnd (scipy\interpolate\interpnd.c:22803) 
File "scipy\spatial\__init__.pyc", line 87, in <module> 
File "scipy\spatial\kdtree.pyc", line 8, in <module> 
File "scipy\sparse\__init__.pyc", line 193, in <module> 
File "scipy\sparse\csgraph\__init__.pyc", line 148, in <module> 
File "scipy\sparse\csgraph\_shortest_path.pyc", line 12, in <module> 
File "scipy\sparse\csgraph\_shortest_path.pyc", line 10, in __load 
File "_shortest_path.pyx", line 18, in init scipy.sparse.csgraph._shortest_path (scipy\sparse 
\csgraph\_shortest_path.c:14224) 
ImportError: No module named _validation 
File "pyqtgraph_test.pyw", line 8, in <module> 
File "pyqtgraph\__init__.pyc", line 177, in <module> 
File "pyqtgraph\__init__.pyc", line 167, in importAll 
File "pyqtgraph\__init__.pyc", line 159, in importModules 
Traceback (most recent call last): 
File "pyqtgraph\__init__.pyc", line 155, in importModules 
File "pyqtgraph\graphicsItems\GraphicsLayout.pyc", line 6, in <module> 
File "pyqtgraph\graphicsItems\PlotItem\__init__.pyc", line 1, in <module> 
File "pyqtgraph\graphicsItems\PlotItem\PlotItem.pyc", line 32, in <module> 
File "pyqtgraph\graphicsItems\PlotDataItem.pyc", line 4, in <module> 
File "pyqtgraph\graphicsItems\PlotCurveItem.pyc", line 4, in <module> 
File "scipy\stats\__init__.pyc", line 320, in <module> 
File "scipy\stats\stats.pyc", line 245, in <module> 
ImportError: cannot import name futil 
File "pyqtgraph_test.pyw", line 8, in <module> 
File "pyqtgraph\__init__.pyc", line 177, in <module> 
File "pyqtgraph\__init__.pyc", line 167, in importAll 
File "pyqtgraph\__init__.pyc", line 159, in importModules 
Traceback (most recent call last): 
File "pyqtgraph\__init__.pyc", line 155, in importModules 
File "pyqtgraph\graphicsItems\PlotCurveItem.pyc", line 4, in <module> 
File "scipy\stats\__init__.pyc", line 320, in <module> 
File "scipy\stats\stats.pyc", line 245, in <module> 
ImportError: cannot import name futil 
File "pyqtgraph_test.pyw", line 8, in <module> 
File "pyqtgraph\__init__.pyc", line 177, in <module> 
File "pyqtgraph\__init__.pyc", line 167, in importAll 
File "pyqtgraph\__init__.pyc", line 159, in importModules 
Traceback (most recent call last): 
File "pyqtgraph\__init__.pyc", line 155, in importModules 
File "pyqtgraph\graphicsItems\GradientEditorItem.pyc", line 8, in <module> 
File "pyqtgraph\colormap.pyc", line 2, in <module> 
File "scipy\interpolate\__init__.pyc", line 160, in <module> 
File "scipy\interpolate\ndgriddata.pyc", line 10, in <module> 
File "scipy\interpolate\interpnd.pyc", line 12, in <module> 
File "scipy\interpolate\interpnd.pyc", line 10, in __load 
File "interpnd.pyx", line 1, in init scipy.interpolate.interpnd (scipy\interpolate\interpnd.c:22803) 
File "scipy\spatial\__init__.pyc", line 87, in <module> 
File "scipy\spatial\kdtree.pyc", line 8, in <module> 
File "scipy\sparse\__init__.pyc", line 193, in <module> 
File "scipy\sparse\csgraph\__init__.pyc", line 148, in <module> 
File "scipy\sparse\csgraph\_shortest_path.pyc", line 12, in <module> 
File "scipy\sparse\csgraph\_shortest_path.pyc", line 10, in __load 
File "_shortest_path.pyx", line 18, in init scipy.sparse.csgraph._shortest_path (scipy\sparse 
\csgraph\_shortest_path.c:14224) 
ImportError: No module named _validation 
File "pyqtgraph_test.pyw", line 8, in <module> 
File "pyqtgraph\__init__.pyc", line 177, in <module> 
File "pyqtgraph\__init__.pyc", line 167, in importAll 
File "pyqtgraph\__init__.pyc", line 159, in importModules 
Traceback (most recent call last): 
File "pyqtgraph\__init__.pyc", line 155, in importModules 
File "pyqtgraph\graphicsItems\ScatterPlotItem.pyc", line 7, in <module> 
File "scipy\stats\__init__.pyc", line 320, in <module> 
File "scipy\stats\stats.pyc", line 245, in <module> 
ImportError: cannot import name futil 
File "pyqtgraph_test.pyw", line 8, in <module> 
File "pyqtgraph\__init__.pyc", line 178, in <module> 
File "pyqtgraph\__init__.pyc", line 167, in importAll 
File "pyqtgraph\__init__.pyc", line 159, in importModules 
Traceback (most recent call last): 
File "pyqtgraph\__init__.pyc", line 155, in importModules 
File "pyqtgraph\widgets\PlotWidget.pyc", line 10, in <module> 
File "pyqtgraph\graphicsItems\PlotItem\__init__.pyc", line 1, in <module> 
File "pyqtgraph\graphicsItems\PlotItem\PlotItem.pyc", line 32, in <module> 
File "pyqtgraph\graphicsItems\PlotDataItem.pyc", line 4, in <module> 
File "pyqtgraph\graphicsItems\PlotCurveItem.pyc", line 4, in <module> 
File "scipy\stats\__init__.pyc", line 320, in <module> 
File "scipy\stats\stats.pyc", line 245, in <module> 
ImportError: cannot import name futil 
File "pyqtgraph_test.pyw", line 8, in <module> 
File "pyqtgraph\__init__.pyc", line 178, in <module> 
File "pyqtgraph\__init__.pyc", line 167, in importAll 
File "pyqtgraph\__init__.pyc", line 159, in importModules 
Traceback (most recent call last): 
File "pyqtgraph\__init__.pyc", line 155, in importModules 
File "pyqtgraph\widgets\GradientWidget.pyc", line 4, in <module> 
File "pyqtgraph\graphicsItems\GradientEditorItem.pyc", line 8, in <module> 
File "pyqtgraph\colormap.pyc", line 2, in <module> 
File "scipy\interpolate\__init__.pyc", line 160, in <module> 
File "scipy\interpolate\ndgriddata.pyc", line 10, in <module> 
File "scipy\interpolate\interpnd.pyc", line 12, in <module> 
File "scipy\interpolate\interpnd.pyc", line 10, in __load 
File "interpnd.pyx", line 1, in init scipy.interpolate.interpnd (scipy\interpolate\interpnd.c:22803) 
File "scipy\spatial\__init__.pyc", line 87, in <module> 
File "scipy\spatial\kdtree.pyc", line 8, in <module> 
File "scipy\sparse\__init__.pyc", line 193, in <module> 
File "scipy\sparse\csgraph\__init__.pyc", line 148, in <module> 
File "scipy\sparse\csgraph\_shortest_path.pyc", line 12, in <module> 
File "scipy\sparse\csgraph\_shortest_path.pyc", line 10, in __load 
File "_shortest_path.pyx", line 18, in init scipy.sparse.csgraph._shortest_path (scipy\sparse 
\csgraph\_shortest_path.c:14224) 
ImportError: No module named _validation 
File "pyqtgraph_test.pyw", line 8, in <module> 
File "pyqtgraph\__init__.pyc", line 178, in <module> 
File "pyqtgraph\__init__.pyc", line 167, in importAll 
File "pyqtgraph\__init__.pyc", line 159, in importModules 
Traceback (most recent call last): 
File "pyqtgraph\__init__.pyc", line 155, in importModules 
File "pyqtgraph\widgets\GraphicsLayoutWidget.pyc", line 2, in <module> 
File "pyqtgraph\graphicsItems\GraphicsLayout.pyc", line 6, in <module> 
File "pyqtgraph\graphicsItems\PlotItem\__init__.pyc", line 1, in <module> 
File "pyqtgraph\graphicsItems\PlotItem\PlotItem.pyc", line 32, in <module> 
File "pyqtgraph\graphicsItems\PlotDataItem.pyc", line 4, in <module> 
File "pyqtgraph\graphicsItems\PlotCurveItem.pyc", line 4, in <module> 
File "scipy\stats\__init__.pyc", line 320, in <module> 
File "scipy\stats\stats.pyc", line 245, in <module> 
ImportError: cannot import name futil 
File "pyqtgraph_test.pyw", line 8, in <module> 
File "pyqtgraph\__init__.pyc", line 178, in <module> 
File "pyqtgraph\__init__.pyc", line 167, in importAll 
File "pyqtgraph\__init__.pyc", line 159, in importModules 
Traceback (most recent call last): 
File "pyqtgraph\__init__.pyc", line 155, in importModules 
File "pyqtgraph\widgets\HistogramLUTWidget.pyc", line 8, in <module> 
File "pyqtgraph\graphicsItems\HistogramLUTItem.pyc", line 10, in <module> 
File "pyqtgraph\graphicsItems\GradientEditorItem.pyc", line 8, in <module> 
File "pyqtgraph\colormap.pyc", line 2, in <module> 
File "scipy\interpolate\__init__.pyc", line 160, in <module> 
File "scipy\interpolate\ndgriddata.pyc", line 10, in <module> 
File "scipy\interpolate\interpnd.pyc", line 12, in <module> 
File "scipy\interpolate\interpnd.pyc", line 10, in __load 
File "interpnd.pyx", line 1, in init scipy.interpolate.interpnd (scipy\interpolate\interpnd.c:22803) 
File "scipy\spatial\__init__.pyc", line 87, in <module> 
File "scipy\spatial\kdtree.pyc", line 8, in <module> 
File "scipy\sparse\__init__.pyc", line 193, in <module> 
File "scipy\sparse\csgraph\__init__.pyc", line 148, in <module> 
File "scipy\sparse\csgraph\_shortest_path.pyc", line 12, in <module> 
File "scipy\sparse\csgraph\_shortest_path.pyc", line 10, in __load 
File "_shortest_path.pyx", line 18, in init scipy.sparse.csgraph._shortest_path (scipy\sparse 
\csgraph\_shortest_path.c:14224) 
ImportError: No module named _validation 
Traceback (most recent call last): 
File "pyqtgraph_test.pyw", line 8, in <module> 
File "pyqtgraph\__init__.pyc", line 180, in <module> 
File "pyqtgraph\imageview\__init__.pyc", line 6, in <module> 
File "pyqtgraph\imageview\ImageView.pyc", line 20, in <module> 
File "pyqtgraph\imageview\ImageViewTemplate_pyqt.pyc", line 159, in <module> 
File "pyqtgraph\widgets\PlotWidget.pyc", line 10, in <module> 
File "pyqtgraph\graphicsItems\PlotItem\__init__.pyc", line 1, in <module> 
File "pyqtgraph\graphicsItems\PlotItem\PlotItem.pyc", line 32, in <module> 
File "pyqtgraph\graphicsItems\PlotDataItem.pyc", line 4, in <module> 
File "pyqtgraph\graphicsItems\PlotCurveItem.pyc", line 4, in <module> 
File "scipy\stats\__init__.pyc", line 320, in <module> 
File "scipy\stats\stats.pyc", line 245, in <module> 
ImportError: cannot import name futil 

Что я делаю неправильно?

+0

Это похоже на проблему с вашей неспешной установкой: scipy.stats хочет импортировать 'futil', которого не существует. Можете ли вы импортировать scipy.stats из интерактивного сеанса? – Luke

+0

Вы были правы. но после того, как я исправил ошибку scipy, сообщение об ошибке остается неизменным. Я следил за остальной частью вышеупомянутого учебника без каких-либо улучшений. в сообщении об ошибке ничего не изменилось. возможно, устаревшее учебное пособие? –

ответ

2

Кажется, что у каждой версии scipy есть другой набор ошибок, из-за которых py2exe терпит неудачу. Для последней версии (0.12.0), я обнаружил, что мне нужны эти две строки где-то в моей программе, так что py2exe будет включать их в сборку:

from scipy.stats import futil 
from scipy.sparse.csgraph import _validation 

По какой-то причине это не похоже на работу в просто поместите их в параметр py2exe «includes» в сценарии установки.

+0

Это помогло. не могущий быть оплаченным. большое спасибо –