Pyinstaller --onefile warning pyconfig.h when importing scipy or scipy.signal

后端 未结 5 1145
梦毁少年i
梦毁少年i 2020-12-01 05:23

This is very simple to recreate. If my script foo.py is:

import scipy

Then run:

python pyinstaller.py --onefile foo.py
         


        
5条回答
  •  旧巷少年郎
    2020-12-01 06:15

    You can hack the spec file to remove the second instance by adding these lines after a=Analysis:

    for d in a.datas:
        if 'pyconfig' in d[0]: 
            a.datas.remove(d)
            break
    

提交回复
热议问题