我试图将一个简短的python脚本捆绑到一个可执行文件中.我能够成功运行pyinstaller
pyinstaller script.py
Run Code Online (Sandbox Code Playgroud)
但是,当我运行可执行文件时,我收到以下错误.我已经尝试了一切,似乎没有任何工作.
C:\Users\...\Python\dist\script>script
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "c:\users\user\appdata\local\temp\pip-build-0pjuke\pyinstaller\PyInst
aller\loader\pyimod03_importers.py", line 363, in load_module
File "c:\python27\lib\site-packages\pandas\__init__.py", line 13, in <module>
"extensions first.".format(module))
ImportError: C extension: lib not built. If you want to import pandas from the s
ource directory, you may need to run 'python setup.py build_ext --inplace' to bu
ild the C extensions first.
script returned -1
Run Code Online (Sandbox Code Playgroud)
以下是我脚本中的导入:
import pandas
from simple_salesforce import Salesforce
from pandas import Series, DataFrame
import …Run Code Online (Sandbox Code Playgroud) 这是一个例子.无论我怎么能bar_width,这个数字看起来完全一样.如何增加所有条形的宽度?
from bokeh.charts import Bar, output_notebook, show, vplot, hplot, defaults
from bokeh.sampledata.autompg import autompg as df
output_notebook()
df['neg_mpg'] = 0 - df['mpg']
defaults.width = 550
defaults.height = 400
bar_plot7 = Bar(df, label='cyl', values='displ', agg='mean', group='origin', bar_width=10,
title="label='cyl' values='displ' agg='mean' group='origin'", legend='top_right')
show(bar_plot7)
Run Code Online (Sandbox Code Playgroud)