executable

Make Executable Binary File From Elf Using GNU objcopy

别说谁变了你拦得住时间么 提交于 2021-02-17 20:57:08
问题 I'd like to copy an executable ELF file via: $ objcopy -O binary myfile.elf myfile.bin Unfortunately: $ chmod +x myfile.bin $ ./myfile.bin results in: cannot execute binary file Is there any way to retain the files executability? 回答1: To be executable by the execve(2) syscall, a file usually has to be some elf(5) file (or some script, or some old a.out format). But see also binfmt_misc Your objcopy(1) command is loosing the essential meta-data in the ELF file. Maybe you want strip(1) Recall

How to specify Python version and library versions for PyInstaller executable

旧巷老猫 提交于 2021-02-11 08:08:19
问题 When creating an executable file using PyInstaller, how can I bundle a specific Python interpreter and some library from specific versions? I want to create an executable file from my .py script. My __main__.py downloads some data from a website and transform them, then saves them in a folder as excel files. And here are requirements. Use Python 3.6 For this, I found some related posts but never clear to me. My main .py needs Python3.6 to be executed, and the users of this .exe file won't

How to specify Python version and library versions for PyInstaller executable

不问归期 提交于 2021-02-11 08:04:35
问题 When creating an executable file using PyInstaller, how can I bundle a specific Python interpreter and some library from specific versions? I want to create an executable file from my .py script. My __main__.py downloads some data from a website and transform them, then saves them in a folder as excel files. And here are requirements. Use Python 3.6 For this, I found some related posts but never clear to me. My main .py needs Python3.6 to be executed, and the users of this .exe file won't

How to include an executable file in setup.py

二次信任 提交于 2021-02-10 18:12:33
问题 I have a Python project that uses an executable file. The package structure is something like that: /Project /Package __init__.py aClass.py executableFile LICENSE README.md and I've this setup.py: ... setup( author=... author_email=.... classifiers=[...] description=.... install_requires=[...] license=.. long_description=... include_package_data=True packages=find_packages(include=['Package*']) url=.. version=x.x.x ) but when I upload the package as stated here with twine in PyPI, the

How to include an executable file in setup.py

≡放荡痞女 提交于 2021-02-10 18:05:17
问题 I have a Python project that uses an executable file. The package structure is something like that: /Project /Package __init__.py aClass.py executableFile LICENSE README.md and I've this setup.py: ... setup( author=... author_email=.... classifiers=[...] description=.... install_requires=[...] license=.. long_description=... include_package_data=True packages=find_packages(include=['Package*']) url=.. version=x.x.x ) but when I upload the package as stated here with twine in PyPI, the

ImportError: cannot import name '_ni_support' — Using cx-freeze with scipy

爱⌒轻易说出口 提交于 2021-02-10 14:14:13
问题 I have used cx-freeze to make an executable file from my python 3 script. The issue is that apparently cx-freeze is having a hard time importing scipy scripts. I had to resolve other issues previously, e.g. adding the tcl library files manually. Anyway, my setup files is below: from cx_Freeze import setup, Executable import os os.environ['TCL_LIBRARY'] = "C:\\Users\\Gobryas\\AppData\\Local\\Continuum\\anaconda3\\tcl\\tcl8.6" os.environ['TK_LIBRARY'] = "C:\\Users\\Gobryas\\AppData\\Local\

ImportError: cannot import name '_ni_support' — Using cx-freeze with scipy

走远了吗. 提交于 2021-02-10 14:08:12
问题 I have used cx-freeze to make an executable file from my python 3 script. The issue is that apparently cx-freeze is having a hard time importing scipy scripts. I had to resolve other issues previously, e.g. adding the tcl library files manually. Anyway, my setup files is below: from cx_Freeze import setup, Executable import os os.environ['TCL_LIBRARY'] = "C:\\Users\\Gobryas\\AppData\\Local\\Continuum\\anaconda3\\tcl\\tcl8.6" os.environ['TK_LIBRARY'] = "C:\\Users\\Gobryas\\AppData\\Local\

What is the difference between . and ./ in bash? [closed]

余生颓废 提交于 2021-02-07 12:48:27
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . Improve this question Running this command (where a.out is a valid C executable): . a.out ...results in this error: bash: .: a.out: cannot execute binary file However, running the following command: ./a.out ...successfully executes the C binary executable. Clearly, there are 2 types of

What is the difference between . and ./ in bash? [closed]

一个人想着一个人 提交于 2021-02-07 12:47:21
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . Improve this question Running this command (where a.out is a valid C executable): . a.out ...results in this error: bash: .: a.out: cannot execute binary file However, running the following command: ./a.out ...successfully executes the C binary executable. Clearly, there are 2 types of

Why does 'msg * alarm' disappear after a while?

∥☆過路亽.° 提交于 2021-02-07 10:48:12
问题 I have a small powershell script which allows me to quickly set an alarm for myself. It basically just waits a specified number of minutes and then calls msg * alarm! This works well - a message box pops up. The only problem is it disappears after a while - so if I'm not at my desk, I'll miss the message box. According to the documentation, found here, this is the behaviour when I don't specify a time value. /time: seconds : Specifies the amount of time the message you sent is displayed on