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....
Related
I was trying to create a virtual env with python3. But it failed to create new. But the existing virtual env are working fine.
Traceback (most recent call last):
File "C:\Users\DELL\AppData\Local\Programs\Python\Python310\lib\site-packages\virtualenv\seed\embed\via_app_data\via_app_data.py", line 82, in _get
result = get_wheel(
File "C:\Users\DELL\AppData\Local\Programs\Python\Python310\lib\site-packages\virtualenv\seed\wheels\acquire.py", line 23, in get_wheel
wheel = from_bundle(distribution, version, for_py_version, search_dirs, app_data, do_periodic_update, env)
File "C:\Users\DELL\AppData\Local\Programs\Python\Python310\lib\site-packages\virtualenv\seed\wheels\bundle.py", line 17, in from_bundle
wheel = periodic_update(distribution, of_version, for_py_version, wheel, search_dirs, app_data, per, env)
File "C:\Users\DELL\AppData\Local\Programs\Python\Python310\lib\site-packages\virtualenv\seed\wheels\periodic_update.py", line 35, in periodic_update
handle_auto_update(distribution, for_py_version, wheel, search_dirs, app_data, env)
File "C:\Users\DELL\AppData\Local\Programs\Python\Python310\lib\site-packages\virtualenv\seed\wheels\periodic_update.py", line 69, in handle_auto_update
embed_update_log.write(u_log.to_dict())
File "C:\Users\DELL\AppData\Local\Programs\Python\Python310\lib\site-packages\virtualenv\app_data\via_disk_folder.py", line 154, in write
self.file.write_text(json.dumps(content, sort_keys=True, indent=2))
File "C:\Users\DELL\AppData\Local\Programs\Python\Python310\lib\pathlib.py", line 1154, in write_text
with self.open(mode='w', encoding=encoding, errors=errors, newline=newline) as f:
File "C:\Users\DELL\AppData\Local\Programs\Python\Python310\lib\pathlib.py", line 1119, in open
return self._accessor.open(self, mode, buffering, encoding, errors,
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\DELL\\AppData\\Local\\pypa\\virtualenv\\wheel\\3.10\\embed\\3\\pip.json'
fail
Your problem is the permission to write to the folder, which you must give to the Python interpreter
Give admin access to the command line
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
The following code:
if os.path.exists(discarded_ims_dir):
shutil.rmtree(discarded_ims_dir)
os.makedirs(discarded_ims_dir)
Gives the following error when running it in a virtual environment on ubuntu 18.04. (I run ubuntu 18.04 in a virtual machine on windows 10.)
Traceback (most recent call last):
File "select_images.py", line 93, in <module>
main()
File "select_images.py", line 37, in main
shutil.rmtree(discarded_ims_dir)
File "/usr/lib/python3.6/shutil.py", line 490, in rmtree
onerror(os.rmdir, path, sys.exc_info())
File "/usr/lib/python3.6/shutil.py", line 488, in rmtree
os.rmdir(path)
OSError: [Errno 26] Text file busy: '/home/johan/HagelJo/ladle_id_ims_3-17-2020_discarded'
Any suggestions?
Recently I have facced to open adaconda navigaator. I have tried to resolve the issue by updateing anaconda from anaconda navigator. Its anaconda 2.6.11 version.
C:\Users\Billal>conda update conda
Traceback (most recent call last):
File "c:\users\billal\anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\users\billal\anaconda3\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Billal\Anaconda3\Scripts\conda.exe__main__.py", line 9, in
File "c:\users\billal\anaconda3\lib\site-packages\markdown__main__.py", line 130, in run
markdown.markdownFromFile(**options)
File "c:\users\billal\anaconda3\lib\site-packages\markdown__init__.py", line 529, in markdownFromFile
kwargs.get('encoding', None))
File "c:\users\billal\anaconda3\lib\site-packages\markdown__init__.py", line 428, in convertFile
input_file = codecs.open(input, mode="r", encoding=encoding)
File "c:\users\billal\anaconda3\lib\codecs.py", line 895, in open
file = builtins.open(filename, mode, buffering)
FileNotFoundError: [Errno 2] No such file or directory: 'update'
C:\Users\Billal>
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?