0

I am having issues with getting pyinstaller version 3.6 to work to make my application executable. The crux of my problem is that pyinstaller is not compatible with python 3.8, but when I check python --version on my terminal it confirms I have python 3.7. However, when I check my pip path it gives me pip 20.1.1 from /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip (python 3.8). Also, I am currently using VScode as my editor, and when I check sys.version_info in my app script it gives me version 3.8 as well. I tried creating a virtual environment in new file, double checking the package.json with 3.7, but when I run sys.version_info it still gives me 3.8 (I am still a beginner at using shell/terminal so I am confused as to why since my python version is 3.7 on my shell).

I worried about doing a complete uninstall of python and pip since I've read it could mess up the paths and cause complications repairing. How can I change the pip path to python 3.7 or have my script run 3.7 so that I can use pyinstaller on my macOS?

Jonathan G.
  • 243
  • 1
  • 2
  • 12
  • Although it says 3.7 when i check python version on terminal. When I do `import site; site.getsitepackages()` in python shell i get the same 3.8 path that shows when I check pip. It seems like the paths are correct. – Jonathan G. Jul 10 '20 at 04:40
  • what does `python3 --version` show you – Peter Kapteyn Jul 10 '20 at 18:23
  • python3 --version was showing me 3.7.7. However, I did end up just reinstalling python 3.7 and pip and deleting python 3.8 from /Library/Frameworks. So the versions are now correct. But my issue with pyinstaller remains, as my app opens for a few seconds and then immediately closes. – Jonathan G. Jul 10 '20 at 18:28
  • So it builds OK with pyinstaller? Are there any error outputs when it crashes? – Peter Kapteyn Jul 10 '20 at 18:35
  • Correct, pyinstaller correctly builds the files and puts them into a dist folder, which contains the app and unix executable file. Clicking the app file results in nothing, no errors. Clicking the unix executable file works, but the app is opened with a terminal window alongside. – Jonathan G. Jul 10 '20 at 18:41
  • When I took a deeper look into the app file I find 4 folders Frameworks, Info.plist, MacOS, Resources. However, the Frameworks folder is empty I am wondering if that is the issue. – Jonathan G. Jul 10 '20 at 18:42
  • Problem solved using py2app, I have forsaken pyinstaller. – Jonathan G. Jul 10 '20 at 18:54
  • Glad you figures it out – Peter Kapteyn Jul 10 '20 at 18:56

0 Answers0