I have a file in Python 3.4 which I have converted in exe using cx_freeze. When I double click the file I get nothing, seems its opening, and closing on its own however when I go to the command prompt n run it I get the below error:
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\cx_Freeze\initscripts\Console.py", line 27, in <module>
exec(code, m.__dict__)
File "Mytime.py", line 10, in <module>
File "C:\Python34\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 43, in _init_
self.profile = FirefoxProfile()
File "C:\Python34\lib\site-packages\selenium\webdriver\firefox\firefox_profile.py", line 64, in _init_
WEBDRIVER_PREFERENCES)) as default_prefs:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Python34\\build\\exe.win32-3.4\\library.zip\\selenium\\webdriver\\firefox\\webdriver_prefs.json'
What's missing?
Related
when I run anyu python using scapy fully updated it does this:
Traceback (most recent call last):
File "/home/pi/pentest/NetScan/netscan.py", line 36, in <module>
from scapy.all import *
File "/home/pi/.local/lib/python3.9/site-packages/scapy/all.py", line 16, in <module>
from scapy.arch import *
File "/home/pi/.local/lib/python3.9/site-packages/scapy/arch/__init__.py", line 25, in <module>
from scapy.arch.bpf.core import get_if_raw_addr
File "/home/pi/.local/lib/python3.9/site-packages/scapy/arch/bpf/core.py", line 29, in <module>
LIBC = cdll.LoadLibrary(find_library("libc"))
File "/usr/lib/python3.9/ctypes/util.py", line 341, in find_library
_get_soname(_findLib_gcc(name)) or _get_soname(_findLib_ld(name))
File "/usr/lib/python3.9/ctypes/util.py", line 147, in _findLib_gcc
if not _is_elf(file):
File "/usr/lib/python3.9/ctypes/util.py", line 99, in _is_elf
with open(filename, 'br') as thefile:
FileNotFoundError: [Errno 2] No such file or directory: b'liblibc.a'
I tired to fix by doing based on this solution
cd /usr/lib
sudo ln -s -f libc.a liblibc.a
but it dons't work.
How can I fix this problem
Fore me when I updated scapy it works.
I'm trying to make my python bitcoin wallet go to exe by pyinstaller but when i run this and try to create new wallet i get this error:
Traceback (most recent call last):
File "btcwallet.py", line 111, in <module>
File "btcwallet.py", line 80, in menu
File "btcwallet.py", line 47, in save_wallet
File "btcwallet.py", line 40, in generate_wallet
File "pywallet\wallet.py", line 13, in generate_mnemonic
File "pywallet\utils\ethereum.py", line 1321, in master_key_from_entropy
File "mnemonic\mnemonic.py", line 47, in __init__
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\mistr\\AppData\\Local\\Temp\\_MEI35242\\mnemonic\\wordlist/english.txt'
[2548] Failed to execute script 'btcwallet' due to unhandled exception!
Solution:
I had to use this command: pyinstaller --onefile --collect-all mnemonic --hidden-import mnemonic btcwallet.py
I'm running a Python executable file on my PC. I created it using cx_freeze. I ran it and I am getting the following errors:
H:\>cmd /K C:\Executables\Minneapolis\build\exe.win-amd64-3.7\MinneapolisDiscovery.exe
Traceback (most recent call last):
File "C:\Python37\lib\cx_Freeze\initscripts\__startup__.py", line 40, in run
module.run()
File "C:\Python37\lib\cx_Freeze\initscripts\Console.py", line 23, in run
exec(code, {'__name__': '__main__'})
File "MinneapolisDiscovery.py", line 1, in <module>
File "C:\Python37\lib\requests\__init__.py", line 43, in <module>
import urllib3
File "C:\Python37\lib\urllib3\__init__.py", line 8, in <module>
from .connectionpool import (
File "C:\Python37\lib\urllib3\connectionpool.py", line 28, in <module>
from .packages.six.moves import queue
File "C:\Python37\lib\urllib3\packages\six.py", line 92, in __get__
result = self._resolve()
File "C:\Python37\lib\urllib3\packages\six.py", line 115, in _resolve
return _import_module(self.mod)
File "C:\Python37\lib\urllib3\packages\six.py", line 82, in _import_module
__import__(name)
ModuleNotFoundError: No module named 'queue'
It looks like something related to urllib3 or requests, but I've never gotten this error before. Any ideas on what I need to do to get this exe file to run?
I'm having issues with virtualenv wrapper, I receive the below error when I run:
source /cygdrive/c/Python34/Scripts/virtualenvwrapper.sh
I've run
which python <- shows correct path
which virtualenvwrapper.sh <- shows correct path
which virtualenv <- shows correct path
Error:
>$ source /cygdrive/c/Python34/Scripts/virtualenvwrapper.sh
stevedore.extension error calling 'project': [Errno 2] No such file or directory : 'C:\\home\\kolafsson\\.virtualenvs\\premkproject'
stevedore.extension [Errno 2] No such file or directory: 'C:\\home\\kolafsson\\. virtualenvs\\premkproject'
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\stevedore-0.15-py3.4.egg\stevedore\extensi on.py", line 248, in _invoke_one_plugin
response_callback(func(e, *args, **kwds))
File "C:\Python34\lib\site-packages\virtualenvwrapper-4.2-py3.4.egg\virtualenv wrapper\hook_loader.py", line 185, in invoke
File "C:\Python34\lib\site-packages\virtualenvwrapper-4.2-py3.4.egg\virtualenv wrapper\project.py", line 30, in initialize
comment)
File "C:\Python34\lib\site-packages\virtualenvwrapper-4.2-py3.4.egg\virtualenv wrapper\user_scripts.py", line 124, in make_hook
f = open(filename, 'w')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\home\\kolafsson\\.v irtualenvs\\premkproject'
stevedore.extension error calling 'user_scripts': [Errno 2] No such file or dire ctory: 'C:\\home\\kolafsson\\.virtualenvs\\initialize'
stevedore.extension [Errno 2] No such file or directory: 'C:\\home\\kolafsson\\. virtualenvs\\initialize'
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\stevedore-0.15-py3.4.egg\stevedore\extensi on.py", line 248, in _invoke_one_plugin
response_callback(func(e, *args, **kwds))
File "C:\Python34\lib\site-packages\virtualenvwrapper-4.2-py3.4.egg\virtualenv wrapper\hook_loader.py", line 185, in invoke
File "C:\Python34\lib\site-packages\virtualenvwrapper-4.2-py3.4.egg\virtualenv wrapper\user_scripts.py", line 141, in initialize
make_hook(get_path('$VIRTUALENVWRAPPER_HOOK_DIR', filename), comment)
File "C:\Python34\lib\site-packages\virtualenvwrapper-4.2-py3.4.egg\virtualenv wrapper\user_scripts.py", line 124, in make_hook
f = open(filename, 'w')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\home\\kolafsson\\.v irtualenvs\\initialize'
Traceback (most recent call last):
File "C:\Python34\lib\runpy.py", line 171, in _run_module_as_main
"__main__", mod_spec)
File "C:\Python34\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Python34\lib\site-packages\virtualenvwrapper-4.2-py3.4.egg\virtualenv wrapper\hook_loader.py", line 217, in <module>
File "C:\Python34\lib\site-packages\virtualenvwrapper-4.2-py3.4.egg\virtualenv wrapper\hook_loader.py", line 137, in main
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/virtualenvwrapper- initialize-hook-Kxjb02CrwN'
virtualenvwrapper.sh: There was a problem running the initialization hooks.
If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenv has been installed for
VIRTUALENVWRAPPER_PYTHON=/cygdrive/c/Python34/python and that PATH is
set properly.
Does anyone know what is causing this error and how I could fix it?
Problems I had were due to the permissions on the virtualenv directory not being correct. The had root when I needed the local user.
which here might be 'C:\\home\\kolafsson\\.v....
I am using cx_freeze to bundle my app. I have 2 questions.
1) I am using OSX Mountain Lion - the /build/exe.macosx-10.8-x86_64-2.7 that I have - will it contain executables for Windows, Linux as well - and if so, where in the list can I find it? My original script is cpu.py. The dir contains a lot of ".so" files and 1 "cpu" file.
2) When I try "cpu" from the list above, I get this output. 'psutil' is a Python module required for the script - cpu.py.
Desktop/build/exe.macosx-10.8-x86_64-2.7/cpu ; exit;
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/cx_Freeze/initscripts/Console.py", line 27, in <module>
exec code in m.__dict__
File "cpu.py", line 6, in <module>
File "/usr/local/lib/python2.7/site-packages/psutil/__init__.py", line 102, in <module>
import psutil._psosx as _psplatform
File "/usr/local/lib/python2.7/site-packages/psutil/_psosx.py", line 14, in <module>
import _psutil_osx
File "build/bdist.macosx-10.8-x86_64/egg/_psutil_osx.py", line 7, in <module>
File "build/bdist.macosx-10.8-x86_64/egg/_psutil_osx.py", line 4, in __bootstrap__
File "build/bdist.macosx-10.8-x86_64/egg/pkg_resources.py", line 945, in resource_filename
File "build/bdist.macosx-10.8-x86_64/egg/pkg_resources.py", line 1626, in get_resource_filename
NotImplementedError: resource_filename() only supported for .egg, not .zip
logout