Can't build a distribution (IsADirectoryError)
See original GitHub issueEel version
$ pip freeze | grep -i eel
Eel==0.12.3
Describe the bug I wanted to build a distributable binary as described in the docs. I got TODO.
To Reproduce Steps to reproduce the behavior:
$ git clone https://github.com/MartinThoma/write-math-eel.git && cd write-math-eel
$ python -m venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
$ pip install pyinstaller
$ python -m eel main.py web --onefile --noconsole
Building executable with main script 'main.py' and web folder 'web'...
Running:
pyinstaller main.py --hidden-import bottle_websocket --add-data /home/moose/GitHub/MartinThoma/write-math-eel/venv/lib/python3.8/site-packages/eel/eel.js:eel --add-data web:web --onefile --noconsole
380 INFO: PyInstaller: 3.6
380 INFO: Python: 3.8.1
438 INFO: Platform: Linux-5.4.0-29-generic-x86_64-with-glibc2.29
439 INFO: wrote /home/moose/GitHub/MartinThoma/write-math-eel/main.spec
440 INFO: UPX is not available.
442 INFO: Extending PYTHONPATH with paths
['/home/moose/GitHub/MartinThoma/write-math-eel',
'/home/moose/GitHub/MartinThoma/write-math-eel']
442 INFO: checking Analysis
534 INFO: Appending 'datas' from .spec
542 INFO: checking PYZ
568 INFO: checking PKG
582 INFO: Building because toc changed
582 INFO: Building PKG (CArchive) PKG-00.pkg
52410 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
52463 INFO: Bootloader /home/moose/GitHub/MartinThoma/write-math-eel/venv/lib/python3.8/site-packages/PyInstaller/bootloader/Linux-64bit/run
52463 INFO: checking EXE
52464 INFO: Building because name changed
52464 INFO: Building EXE from EXE-00.toc
Traceback (most recent call last):
File "/home/moose/.pyenv/versions/3.8.1/lib/python3.8/runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/moose/.pyenv/versions/3.8.1/lib/python3.8/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/moose/GitHub/MartinThoma/write-math-eel/venv/lib/python3.8/site-packages/eel/__main__.py", line 24, in <module>
pyi.run(full_args)
File "/home/moose/GitHub/MartinThoma/write-math-eel/venv/lib/python3.8/site-packages/PyInstaller/__main__.py", line 114, in run
run_build(pyi_config, spec_file, **vars(args))
File "/home/moose/GitHub/MartinThoma/write-math-eel/venv/lib/python3.8/site-packages/PyInstaller/__main__.py", line 65, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "/home/moose/GitHub/MartinThoma/write-math-eel/venv/lib/python3.8/site-packages/PyInstaller/building/build_main.py", line 734, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "/home/moose/GitHub/MartinThoma/write-math-eel/venv/lib/python3.8/site-packages/PyInstaller/building/build_main.py", line 681, in build
exec(code, spec_namespace)
File "/home/moose/GitHub/MartinThoma/write-math-eel/main.spec", line 20, in <module>
exe = EXE(pyz,
File "/home/moose/GitHub/MartinThoma/write-math-eel/venv/lib/python3.8/site-packages/PyInstaller/building/api.py", line 445, in __init__
self.__postinit__()
File "/home/moose/GitHub/MartinThoma/write-math-eel/venv/lib/python3.8/site-packages/PyInstaller/building/datastruct.py", line 160, in __postinit__
self.assemble()
File "/home/moose/GitHub/MartinThoma/write-math-eel/venv/lib/python3.8/site-packages/PyInstaller/building/api.py", line 522, in assemble
os.remove(self.name)
IsADirectoryError: [Errno 21] Is a directory: '/home/moose/GitHub/MartinThoma/write-math-eel/dist/main'
Expected behavior
I thought I would either get an exe file (e.g. when this distributable is for Windows) or a .tar.gz
/ .deb
(when it’s for Linux)
Desktop (please complete the following information):
- OS:
Ubuntu 20.04 LTS
- Browser
Google Chrome
- Version :
Version 81.0.4044.138
Additional context The documentation is not clear if this is OS specific and which OS it is for.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
Can't build a distribution (IsADirectoryError) #298 - GitHub
Eel version $ pip freeze | grep -i eel Eel==0.12.3 Describe the bug I wanted to build a distributable binary as described in...
Read more >IsADirectoryError: [Errno 21] Is a directory: '/' error while using ...
From your stack trace it looks like a directory is creeping in your listdF and pandas.read_csv() fails trying to load that.
Read more >mailman3 IsADirectoryError: [Errno 21] Is a directory: '/builddir ...
Your package (mailman3) Fails To Install in Fedora 33: can't install mailman3: - nothing provides python3.8dist(setuptools) needed by mailman3- ...
Read more >Someone help me to solve "/: file not recognized: Is a directory ...
Hi, now I am trying to install IGeos software in openSuse 11.2, I have installed Qt3, when using Qt3 to compile xviewer, I...
Read more >Changelog — Python 3.11.1 documentation
The errno modules exposes the new error number. getpath.py now ignores PermissionError when it cannot open landmark files pybuilddir.txt and ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry, I haven’t seen your answer before I posted the other issue. In between, I tried it like this but I failed - but you helped me: https://github.com/samuelhwilliams/Eel/issues/331 🎉
You may need to build it without the
--onefile
flag and check that all the files/packages/libs that your app needs are being collected by pyinstaller correctly. Sometimes, I think, it can miss things. This feels like what’s happening - it can’t findmodel.tar
.The PyInstaller docs should help you include extra files you need. https://pyinstaller.readthedocs.io/en/stable/operating-mode.html#analysis-finding-the-files-your-program-needs