Wpis z mikrobloga

kurde, mecze się już pól dnia, chce sobie w Pycharmie zrobić z .py plik exe,

próbowałem py2exe i pyinstaller

py2exe

plik setup.py

from distutils.core import setup
import py2exe
setup(console=['1.py'])

wynik:

usage: setup.py [globalopts] cmd1 [cmd1opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help

error: no commands supplied

przy PyInstaller

TypeError: expected str, bytes or os.PathLike object, not NoneType

może ktoś mi coś poradzić, jak prosto zrobić z py -> exe ?

#python #programowanie #pycharm
  • 27
@yjkis: tu masz temat:
https://github.com/pyinstaller/pyinstaller/issues/3942

piszą o tym, że poza envem możesz skompilować:

(...) the only way I figured out to built the single executable was to exit out of the virtual environment and the attempt to compile. That means you must have pyinstaller installed in your python install. After that just cd into the app folder and attempt to create the executable. don't enable the vevn. let me know if
@stranger13: tak wiem, pozniej bede sie meczyl w dodawanie bibliotek do tego, a to juz bedzie trzeba wszystko upakowac w tego exe ;(

ogolnie python sobie kiepskie z tym radzi, no ale z drugiej strony lepsze to niż "nie da sie" :)