No Module: browserhistory

17 views
Skip to first unread message

Sandeep Periwal

unread,
Jul 16, 2020, 12:52:27 PM7/16/20
to PyInstaller
Hi,

93 INFO: PyInstaller: 3.6
93 INFO: Python: 3.7.7
97 INFO: Platform: Windows-10-10.0.18362-SP0

My application uses the python package browserhistory: https://pypi.org/project/browserhistory/
Application runs fine via pycharm but when building a windows installer, I get the error 

pyinstaller.exe --noupx --onefile --hidden-import=fixtk MyScript.py

No Module named: 'browserhistory'
Failed to Execute Script

warning file shows this:
missing module named browserhistory - imported by gui (top-level)

Please suggest how I can fix this?


Thanks

bwoodsend

unread,
Jul 17, 2020, 1:53:55 AM7/17/20
to PyInstaller

Does --hidden-import=browserhistory not fix it? That warning makes me think it won’t but try it first anyway.

Application runs fine via pycharm

Can you also ensure that running it from cmd works too (using python MyScript.py)? If it does then try using python -m PyInstaller instead of just PyInstaller.exe. I believe there is a small chance your PyInstaller and PyCharm are not using the same environment if it’s failing to find what should be a trivial package for PyInstaller.

Sandeep Periwal

unread,
Jul 17, 2020, 2:54:10 AM7/17/20
to PyInstaller
Bull's eye!!
python MyScript.py threw the same error.

I remember installing browserhistory package from within Pycharm's python console.
I did not realize that the environment would be restricted to PyCharm only.

I did pip install browserhistory from the terminal & python MyScript.py now works.

Thanks a ton!!
Reply all
Reply to author
Forward
0 new messages