0

I created my project with python 3.7. when I run 'pyinstaller --onefile -w dunamicGUI.py' command in terminal from /Users/mdarifulislam/Documents/GitHub/ZKProject/pythonServer/ directory it shows

40 INFO: PyInstaller: 3.5
40 INFO: Python: 2.7.16
47 INFO: Platform: Darwin-19.2.0-x86_64-i386-64bit
48 INFO: wrote /Users/mdarifulislam/Documents/GitHub/ZKProject/pythonServer/dunamicGUI.spec
54 INFO: UPX is not available.
Traceback (most recent call last):
  File "/usr/local/bin/pyinstaller", line 10, in <module>
    sys.exit(run())
  File "/usr/local/lib/python2.7/site-packages/PyInstaller/__main__.py", line 111, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "/usr/local/lib/python2.7/site-packages/PyInstaller/__main__.py", line 63, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/PyInstaller/building/build_main.py", line 844, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
  File "/usr/local/lib/python2.7/site-packages/PyInstaller/building/build_main.py", line 791, in build
    exec(code, spec_namespace)
  File "/Users/mdarifulislam/Documents/GitHub/ZKProject/pythonServer/dunamicGUI.spec", line 17, in <module>
    noarchive=False)
  File "/usr/local/lib/python2.7/site-packages/PyInstaller/building/build_main.py", line 190, in __init__
    raise ValueError("script '%s' not found" % script)
ValueError: script '/Users/mdarifulislam/Documents/GitHub/ZKProject/pythonServer/dunamicGUI.py' not found

Now what will be the solution.

  • 1
    The obvious question is, does `/Users/mdarifulislam/Documents/GitHub/ZKProject/pythonServer/dunamicGUI.py` actually exist? If it does, then make sure you set the absolute path in your `.spec`. – r.ook Dec 13 '19 at 16:31
  • @r.ook yes, it exist, and .spec auto generated file after execution. but now i think about python version, here pyinstaller detected python2.7, but i wrote my code in python3.7, i have installed python2.7 and python3.7 both, and i cant delete python2.7, cause MacOS X using python2.7 you can see [here](https://stackoverflow.com/questions/3819449/how-to-uninstall-python-2-7-on-a-mac-os-x-10-6-4) – Md Ariful Islam Dec 13 '19 at 18:07
  • You should be installing `pyinstaller` on `pip3`, not `pip` then. – r.ook Dec 13 '19 at 18:49
  • @r.ook thanks, it works! – Md Ariful Islam Dec 13 '19 at 20:32

0 Answers0