Virtualenv :WindowsError: [Error 5] Access is denied: - python

I'm working with miniconda and git=bash on win7. I'm trying to make a virtualenv:
$ virtualenv myenv
Traceback (most recent call last):
File "e:\miniconda2\lib\runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "e:\miniconda2\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "e:\miniconda2\Scripts\virtualenv.exe\__main__.py", line 9, in <module>
File "e:\miniconda2\lib\site-packages\virtualenv.py", line 713, in main
symlink=options.symlink)
File "e:\miniconda2\lib\site-packages\virtualenv.py", line 925, in create_environment
site_packages=site_packages, clear=clear, symlink=symlink))
File "e:\miniconda2\lib\site-packages\virtualenv.py", line 1202, in install_python
mkdir(bin_dir)
File "e:\miniconda2\lib\site-packages\virtualenv.py", line 323, in mkdir
os.makedirs(path)
File "e:\miniconda2\lib\os.py", line 157, in makedirs
mkdir(name, mode)
WindowsError: [Error 5] Access is denied: 'e:\\ENVS\\virtalenvs\\myenv\\Scripts'
How can I get this working?

Related

While running whisper I am facing FileNotFoundError

This is the command I am running from powershell:
whisper C:\Users\SAMSUNG\Desktop\aud2.mp3 --language Urdu --task translate --model base
This is the complete error:
UserWarning: FP16 is not supported on CPU; using FP32 instead
warnings.warn("FP16 is not supported on CPU; using FP32 instead")
Traceback (most recent call last):
File "c:\users\samsung\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\samsung\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\SAMSUNG\.envs\py3.7\Scripts\whisper.exe\__main__.py", line 7, in <module>
File "C:\Users\SAMSUNG\.envs\py3.7\lib\site-packages\whisper\transcribe.py", line 307, in cli
result = transcribe(model, audio_path, temperature=temperature, **args)
File "C:\Users\SAMSUNG\.envs\py3.7\lib\site-packages\whisper\transcribe.py", line 84, in transcribe
mel = log_mel_spectrogram(audio)
File "C:\Users\SAMSUNG\.envs\py3.7\lib\site-packages\whisper\audio.py", line 111, in log_mel_spectrogram
audio = load_audio(audio)
File "C:\Users\SAMSUNG\.envs\py3.7\lib\site-packages\whisper\audio.py", line 44, in load_audio
.run(cmd=["ffmpeg", "-nostdin"], capture_stdout=True, capture_stderr=True)
File "C:\Users\SAMSUNG\.envs\py3.7\lib\site-packages\ffmpeg\_run.py", line 320, in run
overwrite_output=overwrite_output,
File "C:\Users\SAMSUNG\.envs\py3.7\lib\site-packages\ffmpeg\_run.py", line 285, in run_async
args, stdin=stdin_stream, stdout=stdout_stream, stderr=stderr_stream
File "c:\users\samsung\appdata\local\programs\python\python37\lib\subprocess.py", line 756, in __init__
restore_signals, start_new_session)
File "c:\users\samsung\appdata\local\programs\python\python37\lib\subprocess.py", line 1155, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

PermissionError: [Errno 13] Permission denied: (Pyinstaller)

Traceback (most recent call last):
File "c:\users\me\appdata\local\programs\python\python39\lib\runpy.py", l
ine 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\me\appdata\local\programs\python\python39\lib\runpy.py", l
ine 87, in _run_code
exec(code, run_globals)
File "C:\Users\me\AppData\Local\Programs\Python\Python39\Scripts\pyinstal
ler.exe\__main__.py", line 7, in <module>
File "c:\users\me\appdata\local\programs\python\python39\lib\site-package
s\PyInstaller\__main__.py", line 126, in run
run_build(pyi_config, spec_file, **vars(args))
File "c:\users\me\appdata\local\programs\python\python39\lib\site-package
s\PyInstaller\__main__.py", line 65, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "c:\users\me\appdata\local\programs\python\python39\lib\site-package
s\PyInstaller\building\build_main.py", line 815, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'
))
File "c:\users\me\appdata\local\programs\python\python39\lib\site-package
s\PyInstaller\building\build_main.py", line 762, in build
exec(code, spec_namespace)
File "C:\Users\me\Desktop\Game\main.spec", line 23, in <module>
exe = EXE(pyz,
File "c:\users\me\appdata\local\programs\python\python39\lib\site-package
s\PyInstaller\building\api.py", line 524, in __init__
self.__postinit__()
File "c:\users\me\appdata\local\programs\python\python39\lib\site-package
s\PyInstaller\building\datastruct.py", line 159, in __postinit__
self.assemble()
File "c:\users\me\appdata\local\programs\python\python39\lib\site-package
s\PyInstaller\building\api.py", line 771, in assemble
with open(self.name, 'wb') as outf:
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\me\\Desktop\\Gam
e\\dist\\main.exe'
Why does it not allow me to make it an executable? I'm using Pyinstaller and I ran pyinstaller --onefile -w main.py.. I tried doing other methods, but none of them worked.
Hopefully somebody can help. :)
Thanks,
Dragon
If you are on a Linux machine, try to use the command:
sudo pyinstaller --onefile -w main.py
and if you are on a Windows machine, try to open the cmd using administrator privilege. Just write cmd in the search bar, right-click on the result and chose
open as administrator

Pyinstaller error: no such file or directory

I am trying to make my discord bot a .exe file. Here is the directory
Here is the error:
Traceback (most recent call last):
File "c:\users\suneel\appdata\local\programs\python\python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\suneel\appdata\local\programs\python\python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\Suneel\AppData\Local\Programs\Python\Python39\Scripts\pyinstaller.exe\__main__.py", line 7, in <module>
File "c:\users\suneel\appdata\local\programs\python\python39\lib\site-packages\PyInstaller\__main__.py", line 114, in run
run_build(pyi_config, spec_file, **vars(args))
File "c:\users\suneel\appdata\local\programs\python\python39\lib\site-packages\PyInstaller\__main__.py", line 65, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "c:\users\suneel\appdata\local\programs\python\python39\lib\site-packages\PyInstaller\building\build_main.py", line 725, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "c:\users\suneel\appdata\local\programs\python\python39\lib\site-packages\PyInstaller\building\build_main.py", line 672, in build
exec(code, spec_namespace)
File "C:\Users\Suneel\Desktop\Programmes on Python\Tic Tac Toe Bot\Tic_Tac_Toe_Bot.spec", line 30, in <module>
coll = COLLECT(exe,
File "c:\users\suneel\appdata\local\programs\python\python39\lib\site-packages\PyInstaller\building\api.py", line 709, in __init__
self.__postinit__()
File "c:\users\suneel\appdata\local\programs\python\python39\lib\site-packages\PyInstaller\building\datastruct.py", line 160, in __postinit__
self.assemble()
File "c:\users\suneel\appdata\local\programs\python\python39\lib\site-packages\PyInstaller\building\api.py", line 753, in assemble
shutil.copy(fnm, tofnm)
File "c:\users\suneel\appdata\local\programs\python\python39\lib\shutil.py", line 418, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "c:\users\suneel\appdata\local\programs\python\python39\lib\shutil.py", line 264, in copyfile
with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Suneel\\AppData\\Roaming\\pyinstaller\\bincache00_py3
And the command i ran:
pyinstaller --icon=647618.ico Tic_Tac_Toe_Bot.py
I have used Pyinstaller before and it was working perfectly.

conda Update issue?

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>

virtualenvwrapper - IOError: [Errno 13] Permission denied

I'm trying to install virtualenvwrapper on a fresh Ubuntu 14.04 installation. I followed the steps here and added these lines to my .bashrc:
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Devel
source /usr/local/bin/virtualenvwrapper.sh
I get the following error message when I try and source ~/.bashrc:
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/local/lib/python2.7/dist-packages/virtualenvwrapper/hook_loader.py", line 217, in <module>
main()
File "/usr/local/lib/python2.7/dist-packages/virtualenvwrapper/hook_loader.py", line 131, in main
run_hooks(hook, options, args)
File "/usr/local/lib/python2.7/dist-packages/virtualenvwrapper/hook_loader.py", line 157, in run_hooks
hook_mgr = ExtensionManager(namespace)
File "/usr/local/lib/python2.7/dist-packages/stevedore/extension.py", line 92, in __init__
verify_requirements)
File "/usr/local/lib/python2.7/dist-packages/stevedore/extension.py", line 155, in _load_plugins
for ep in self._find_entry_points(self.namespace):
File "/usr/local/lib/python2.7/dist-packages/stevedore/extension.py", line 148, in _find_entry_points
eps = list(pkg_resources.iter_entry_points(namespace))
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 515, in iter_entry_points
entries = dist.get_entry_map(group)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2371, in get_entry_map
self._get_metadata('entry_points.txt'), self
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2155, in parse_map
for group, lines in data:
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2715, in split_sections
for line in yield_lines(s):
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1989, in yield_lines
for ss in strs:
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2305, in _get_metadata
for line in self.get_metadata_lines(name):
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1369, in get_metadata_lines
return yield_lines(self.get_metadata(name))
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1361, in get_metadata
return self._get(self._fn(self.egg_info,name))
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1470, in _get
stream = open(path, 'rb')
IOError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/numpydoc-0.4-py2.7.egg/EGG-INFO/entry_points.txt'
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=/usr/bin/python and that PATH is
set properly.
This happens when source /usr/local/bin/virtualenvwrapper.sh is executed.
Any ideas? Thanks.
EDIT: Although I am getting this error message, it seems my virtualenv is kind of working. I am able to create new env and even workon them. But every command I ttype, I get the IOError above.
Fixed. I just uninstalled the offending numpy doc package:
sudo pip uninstall numpydoc

Categories