How to create kivy applications for desktop in Windows? - python-3.x

Good afternoon people.
Once again trying to package kivy for DESKTOP on WINDOWS 10 and to no avail!
I had a lot of errors that I managed to solve without disturbing the order in the groups but this one is phoda with ph.
1 - I create the exe using Auto_py_to_exe and before there is any comment that I should use pyinstaller, I tell you, the same thing happens!
2 - My pyinstaller script is as follows:
pyinstaller --noconfirm --onefile --console --name "TeuCu" --add-data "C: /Users/Elias/Desktop/kv_inventario/inventario/main.kv ;." --add-data "C: / Users / Elias / Desktop / kv_inventario / inventario / images; images /" "C: /Users/Elias/Desktop/kv_inventario/inventario/main.py"
3 - The error is exactly like this, when running the application after it is created it returns this error:
[CRITICAL] [Window] Unable to find any valuable Window provider. Please enable debug logging (e.g. add -d if running from the command line, or change the log level in the config) and re-run your app to identify potential causes
sdl2 - Exception: SDL2: Unable to load image
File "kivy\core\__init__.py", line 70, in core_select_lib
File "kivy\core\window\window_sdl2.py", line 152, in __init__
File "kivy\core\window\__init__.py", line 982, in __init__
File "kivy\core\window\window_sdl2.py", line 311, in create_window
File "kivy\core\window\__init__.py", line 1268, in create_window
File "kivy\graphics\instructions.pyx", line 783, in kivy.graphics.instructions.RenderContext.__init__
File "kivy\core\image\__init__.py", line 561, in __init__
File "kivy\core\image\__init__.py", line 754, in _set_filename
File "kivy\core\image\__init__.py", line 460, in load
File "kivy\core\image\__init__.py", line 223, in __init__
File "kivy\core\image\img_sdl2.py", line 47, in load
[CRITICAL] [App] Unable to get a Window, abort.
My solution that could possibly work would be this tip that I found in kivy issues:
Kivy issues
This took me to the post below and translating it asks to uninstall the pillow and reinstall with the wheel
python3 -m pip3 uninstall pillow
python3 -m pip3 install --use-wheel pillow
But it didn't.
I would like your help. Who managed to generate an application for Windows with kivy
I'm using Windows 10 to package.

This error is common - Here are some helpful links:
Kivy not working (Error: Unable to find any valuable Window provider.)
Python app not working after using pyinstaller but doesn't give any errors
https://github.com/kivy/kivy/issues/6342
https://github.com/pal1000/save-legacy-intel-graphics
Kivy does not detect OpenGL 2.0
Windows- Pyinstaller Error "failed to execute script " When App Clicked
Unable to get a window, abort
https://pyinstaller.readthedocs.io/en/stable/when-things-go-wrong.html
https://github.com/kivy/kivy/issues/6276
If none of these work, I also made a video on packaging a kivy app to a single exe for Windows: https://www.youtube.com/watch?v=k9Hx0q5Sopg
Please let me know if you succeed. Cheers!

Related

Installation of python, pip from administrator account not playing well with users

I am having a heck of a time installing an IDE, python and pip to play well across user accounts.
I have started a new job, where I am allowed to work on school/programming stuff at work. I've even been given the go-ahead to install everything I need on my work computer (two nice big monitors!).
I have also been given administrative login, as I can't install anything on my regular account.
So, I log in to the admin account and followed the documentation on how to install Python and Pip for all users:
Check option for install for all uses
Check Add Python 3.8 to path
Select Customize installation
Again select Install for all users
Ensure the installation path is not in a user directory but rather in C:/Programs/Python...
Install PyCharm IDE
Great. Done. I reboot my machine and login to my humble user account and clone a project from GitHub.
Ok, so I want to add a package using pip... First thing I notice is that pip install <package> doesn't work at all. I get a type error.
Next, I try py pip install <package> and that gets things going, but of course fails after downloading the package. I don't have access to install it.
So I read the solution is to use py pip install <package> --user, which proceeds to tell me that installation is complete and successful with one warning:
WARNING: The script f2py.exe is installed in 'C:\Users\WNeill\AppData\Roaming\Python\Python38\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
I find this interesting, since that's not where I installed Python. Also I find it interesting, because I had the installer add Python to the PATH. I verify my python installation is indeed in my machine's "Program Files" and satisfied that it is, I look up the f2py.script and find that it is part of the package I just tried to install.
A little wierded out, I type my import statement. Sure enough. No dice. "no module named numpy"
At this point, I'm a bit tired of running back and forth between two different user accounts repeatedly installing things and uninstalling them. I've been at it for about 6 hours. Is there a way to make python, my IDE and pip all play nicely together or should I just go back to bringing my personal laptop to work and forget my dreams of coding on one big screen with documentation up on the other?
Edit 1: I don't think this matters, but I'm no expert. I'm doing all of this from the PyCharm native terminal which is running Git Bash.
Edit 2: I decided to check my environment variables on my user account (even though they were added to the PATH variable from the admin account. The PATH variable was not set, so I added the the python38 path and he python38/Scripts. Now I am getting a whole new set of errors which, among other things in a two page error report, is telling me that I have to download Microsoft Visual C++. Is this for real?
Edit 3: I have also tried pip install --upgrade setuptools at another user's suggestion. This too fails miserably with error:
Traceback (most recent call last):
File "C:\Users\WNeill\PycharmProjects\data-science-at-home\venv\Scripts\pip-script.py", line 11, in <module>
load_entry_point('pip==19.0.3', 'console_scripts', 'pip')()
File "C:\Users\WNeill\PycharmProjects\data-science-at-home\venv\lib\site-packages\pip-19.0.3-py3.8.egg\pip\_internal\__init__.py", line 78, in main
return command.main(cmd_args)
File "C:\Users\WNeill\PycharmProjects\data-science-at-home\venv\lib\site-packages\pip-19.0.3-py3.8.egg\pip\_internal\cli\base_command.py", line 225, in main
session = self._build_session(
File "C:\Users\WNeill\PycharmProjects\data-science-at-home\venv\lib\site-packages\pip-19.0.3-py3.8.egg\pip\_internal\cli\base_command.py", line 87, in _build_session
session = PipSession(
File "C:\Users\WNeill\PycharmProjects\data-science-at-home\venv\lib\site-packages\pip-19.0.3-py3.8.egg\pip\_internal\download.py", line 344, in __init__
self.headers["User-Agent"] = user_agent()
File "C:\Users\WNeill\PycharmProjects\data-science-at-home\venv\lib\site-packages\pip-19.0.3-py3.8.egg\pip\_internal\download.py", line 134, in user_agent
setuptools_version = get_installed_version("setuptools")
File "C:\Users\WNeill\PycharmProjects\data-science-at-home\venv\lib\site-packages\pip-19.0.3-py3.8.egg\pip\_internal\utils\misc.py", line 902, in get_installed_version
working_set = pkg_resources.WorkingSet()
File "C:\Users\WNeill\PycharmProjects\data-science-at-home\venv\lib\site-packages\pip-19.0.3-py3.8.egg\pip\_vendor\pkg_resources\__init__.py", line 565, in __init__
self.add_entry(entry)
File "C:\Users\WNeill\PycharmProjects\data-science-at-home\venv\lib\site-packages\pip-19.0.3-py3.8.egg\pip\_vendor\pkg_resources\__init__.py", line 621, in add_entry
for dist in find_distributions(entry, True):
File "C:\Users\WNeill\PycharmProjects\data-science-at-home\venv\lib\site-packages\pip-19.0.3-py3.8.egg\pip\_vendor\pkg_resources\__init__.py", line 1886, in find_eggs_in_zip
if metadata.has_metadata('PKG-INFO'):
File "C:\Users\WNeill\PycharmProjects\data-science-at-home\venv\lib\site-packages\pip-19.0.3-py3.8.egg\pip\_vendor\pkg_resources\__init__.py", line 1405, in has_metadata
return self.egg_info and self._has(self._fn(self.egg_info, name))
File "C:\Users\WNeill\PycharmProjects\data-science-at-home\venv\lib\site-packages\pip-19.0.3-py3.8.egg\pip\_vendor\pkg_resources\__init__.py", line 1760, in _has
return zip_path in self.zipinfo or zip_path in self._index()
File "C:\Users\WNeill\PycharmProjects\data-science-at-home\venv\lib\site-packages\pip-19.0.3-py3.8.egg\pip\_vendor\pkg_resources\__init__.py", line 1637, in zipinfo
return self._zip_manifests.load(self.loader.archive)
File "C:\Users\WNeill\PycharmProjects\data-science-at-home\venv\lib\site-packages\pip-19.0.3-py3.8.egg\pip\_vendor\pkg_resources\__init__.py", line 1594, in load
mtime = os.stat(path).st_mtime
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'C:\\Users\\WNeill\\PycharmProjects\\data-science-at-home\\venv\\lib\\site-packages\\setuptools-40.8.0-py3.8.egg'

Permission Error When Trying to Use PyInstaller

When trying to deploy a Kivy App using PyInstaller, I am getting Permission Denied errors even when using and Administrator CMD. The folder has all open editing options for every user. Python has firewall access. How to fix this?
PS C:\Users\theguy\Documents\Python\myapp-build> python -m PyInstaller --name "MyApp" "./"
422 INFO: PyInstaller: 3.3.1
422 INFO: Python: 3.6.5
424 INFO: Platform: Windows-10-10.0.17134-SP0
425 INFO: wrote C:\Users\theguy\Documents\Python\myapp-build\myapp.spec
426 INFO: UPX is not available.
427 INFO: Extending PYTHONPATH with paths
['C:\\Users\\theguy\\Documents\\Python',
'C:\\Users\\theguy\\Documents\\Python\\myapp-build']
428 INFO: checking Analysis
428 INFO: Building Analysis because out00-Analysis.toc is non existent
429 INFO: Initializing module dependency graph...
432 INFO: Initializing module graph hooks...
434 INFO: Analyzing base_library.zip ...
3859 INFO: running Analysis out00-Analysis.toc
3861 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by C:\Anaconda3\python.exe
4398 INFO: Caching module hooks...
4402 INFO: Analyzing C:\Users\btdav\Documents\Python\
Traceback (most recent call last):
File "C:\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Anaconda3\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Anaconda3\lib\site-packages\PyInstaller\__main__.py", line 101, in <module>
run()
File "C:\Anaconda3\lib\site-packages\PyInstaller\__main__.py", line 94, in run
run_build(pyi_config, spec_file, **vars(args))
File "C:\Anaconda3\lib\site-packages\PyInstaller\__main__.py", line 46, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "C:\Anaconda3\lib\site-packages\PyInstaller\building\build_main.py", line 791, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "C:\Anaconda3\lib\site-packages\PyInstaller\building\build_main.py", line 737, in build
exec(text, spec_namespace)
File "<string>", line 16, in <module>
File "C:\Anaconda3\lib\site-packages\PyInstaller\building\build_main.py", line 213, in __init__
self.__postinit__()
File "C:\Anaconda3\lib\site-packages\PyInstaller\building\datastruct.py", line 161, in __postinit__
self.assemble()
File "C:\Anaconda3\lib\site-packages\PyInstaller\building\build_main.py", line 415, in assemble
priority_scripts.append(self.graph.run_script(script))
File "C:\Anaconda3\lib\site-packages\PyInstaller\depend\analysis.py", line 201, in run_script
self._top_script_node = super(PyiModuleGraph, self).run_script(pathname)
File "C:\Anaconda3\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1334, in run_script
with open(pathname, 'rb') as fp:
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\theguy\\Documents\\Python\\myapp-build'
Trick is to make a new directory outside of the one you are building, and then make the build reference the main.py of the Kivy app like in the code below. This fixes permission errors, even from a regular CMD.
PS C:\Users\theguy\Documents\Python\myapp-build> python -m PyInstaller --name "MyApp" "C:\Users\theguy\Documents\Python\myapp\main.py"
I met the same problem!
I figure out it is my antivirus software(Bitdefender) thinks the write out .exe is dangerous, so it block the action.
After I add my work folder to antivirus software Exclusions then reboot computer, it works.
Update:
You need to "Code Signing" your .exe file to make antivirus software think it is less dangerous.
In Windows:
Using OpenSSL to create self-signing, then using Win10 SDK signtool.exe
OpenSSL Command Example:
openssl genpkey -out privkey.pem -algorithm RSA -pkeyopt rsa_keygen_bits:4096
openssl req -new -x509 -key privkey.pem -out cert.pem -days 3650
openssl pkcs12 -inkey privkey.pem -in cert.pem -export -out privkey_cert.pfx -passout pass:[PASSWORD]
signtool Command Example:
signtool sign /debug /f privkey_cert.pfx /p [PASSWORD] [EXECUTE_FILE.exe]
Update 2:
Avoid using command with .spec file
$ pyinstaller FILE.spec
Using Auto PY to EXE to instead of .spec
I don't know WHAT happen with .spec file, but it produces single executable file more problems than .py file do
Update 3:
Make sure every time to clear auto-py-to-exe "Building directory" before executing auto-py-to-exe, you may execute ones to get temp folder path.
for example:
Output
Running auto-py-to-exe v2.9.0
Building directory: C:\Users\John\AppData\Local\Temp\tmpevxvuugz
Provided command: pyinstaller --noconfirm --onefile --windowed ...
Update 4:
I reinstall entire windows os, then run the same thing without clear "Building directory" it turn out is fine! I rethink about it is a virus to infect "Building directory" make all this problem.
I had this problem when my current directory was set to C:\Users\[User]\Desktop\[Some-Folder].
I solved it by changing my current directory to G:\[Some-Other-Folder].
Presumably, this worked because the latter directory didn't require as many permissions.
TL;DR try changing your current directory to one that you know requires no special permissions.
I'm giving this answer in case anyone encounters my scenario. I spent a good deal of time trying other proposed solutions presented here. However, none resolved my file permission errors. Also, while my solution below works for me, I still don't understand why I'm getting a permission error in the first place.
Note that I use pyenv to manage several distributions, though I don't think that is relevant to the issue. Additionally, Pyinstaller failed in the same way with several different python versions I used it on.
Also, note that I know my answer to modify the package source is the "wrong way to do it", but it worked for my edge case and allowed me to continue forward.
When trying to build a single file executable, I kept getting the PermissionError: [Errno 13] Permission denied issue when PyInstaller attempted to access the created .exe to add the final payload data. As mentioned, I tried all the permission/admin/disable-defender tricks I found in other answers here, but the majority of the time, the build process kept failing with a file permissions error. I did notice, however, that sometimes, every once in a rare while, PyInstaller would build the executable correctly, maybe once out of every twenty times, which I couldn't explain. Finally, on a whim, I decided to modify PyInstaller directly and have the build process try the final append a few extra times.
I modified a PyInstaller source file, api.py, to try the final package append up to ten times. After this change, the build process succeeds on the second or third time. With this change, the first or second append attempt usually fails with the same permissions error, but the second or third works, and the executable package is built correctly.
I changed PyInstallers api.py at line 737:
FROM
else:
# Fall back to just appending data at the end of the file
logger.info("Appending %s to EXE", append_type)
with open(self.name, 'ab') as outf:
with open(append_file, 'rb') as inf:
shutil.copyfileobj(inf, outf, length=64 * 1024)
TO
else:
desparation = 10
while desparation:
desparation -= 1
try:
# Fall back to just appending data at the end of the file
logger.info("Appending %s to EXE", append_type)
with open(self.name, 'ab') as outf:
with open(append_file, 'rb') as inf:
shutil.copyfileobj(inf, outf, length=64 * 1024)
desparation = 0
except PermissionError as e:
logger.error(e)
I ran across this same error and found that when I built it in PowerShell with admin rights it worked.
My environment is pycharm uses the venv environment, and there is always a problem with the last open permission. I change the python environment of pycharm to the system environment and run normally.
Use --clean parameter to clean PyInstaller cache and remove temporary files before building.
See : https://pyinstaller.readthedocs.io/en/stable/usage.html#cmdoption-clean
python -m pyinstaller --name "MyApp" "./" --clean
This solved the error for me.
One good solution is to uninstall pyinstaller and install it again :
Step I
python.exe -m pip uninstall pyinstaller
Step II
TRY TO GET AN OLDER VERSION of pyinstaller and its dependencies
python.exe pip install pefile==2019.4.18
python.exe -m pip install pyinstaller==3.6
Step III
try to put the files that you are trying to use with pyinstaller into a new folder for example :
C:\Projects
Step IV
Make an executable in one file
C:\Projects>C:\Python27\Scripts\pyinstaller.exe example_v3.py --onefile
My issue was I was trying to build pyinstaller using a __main__.py inside a folder and invoking pyinstaller on the folder.
Renaming __main__.py to main.py and running pyinstaller on the new main file solved the problem.
Hope this helps.
The error message show "INFO: UPX is not available", you need to import UPX.exe, this problem will be solved.
enter image description here

How do I make PyInstaller bundle Tcl/Tk for OSX targets? - Import Error Tcl/Tk modules not found - Pyinstaller on Mac is not working

I have a frustrating problem that set me back a day trying to get an executable file from my finished bookstore app.
I used the Pyinstaller --onefile --windowed bookstore.py from the main project menu, also vm/bin/Pyinstaller --onefile --windowed bookstore.py which created the .exe and .app file successfully.
HOWEVER, when running the .app file, nothing happens. It starts, and just disappears.
I ran the core executable from the cli on Mac from the main project folder with open dist/bookstore.app/Contents/Macos/bookstore and, loads of research and over 20 variations of code and file changes later, I got the same same trackback (N.B. different file path for global Pyinstaller) error message back from the console.
Traceback (most recent call last):
File "bookstore.py", line 5, in <module>
File "/Users/jmulhall/Documents/Documents/Python_Project_Folder/Python3_Training/ProjectBookstore/vm/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 631, in exec_module
exec(bytecode, module.__dict__)
File "tkinter/__init__.py", line 36, in <module>
File "/Users/jmulhall/Documents/Documents/Python_Project_Folder/Python3_Training/ProjectBookstore/vm/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 714, in load_module
module = loader.load_module(fullname)
ImportError: dlopen(/var/folders/0d/6l_1mgwn4cxbrx21_nm7l8gh0000gn/T/_MEIHyYK9G/_tkinter.so, 2): Library not loaded: #loader_path/Tcl
Referenced from: /var/folders/0d/6l_1mgwn4cxbrx21_nm7l8gh0000gn/T/_MEIHyYK9G/_tkinter.so
Reason: image not found
[3899] Failed to execute script bookstore
My Mac details are as follows:
MacOs High Sierra V 10.13.3 with a standard HD on a mid 2012 Macbook Pro
My Software versions are python 3.6.4, pyinstaller 3.3.1 , virtualenv 15.1.0, sqllite3 3.19.3
The most promsing fix on github did not work ergo my query on fixing the Pyinstaller issue for mac where it loads the tcl and tk resources. The links I followed are here:​
Main Query Link - Github​,
Support File Changes Demo for hooks​
I created a pyinstaller-hooks folder and inserted the hook and pyruntime hooks file into the folder with the tclResources and tkResources name changes in the files as follows:
This did not work.
And I am still getting the above stack trace despite running the new command, picking up the new pyinstaller-hooks folder files in the main project folder, as follows:
pyinstaller --onefile --windowed --additional-hooks-dir pyinstaller-
hooks --runtime-hook pyinstaller-hooks/pyi_rth__tkinter.py bookstore.py
Why is it still not finding the the new files with Tree() and os.path.join()) functions altered to tkResources/tclResources and thus crashing the app when it tries to launch. I could not test the .exe as I have only a Mac environment so Im only focused on the .app right now. Can anybody help with this?
Nearly forgot, my main project folder view is as follows:

[ Python 2.7 ]Package program with Pynsist

I am packaging a Python 2.7 program with the lastest version of Pynsist.
I've created an installer.cfg file following this example.
But when I try to package my application running
pynsist installer.cgf
into the application folder it comes up with
Copying Python installer to build directory
PyLauncher MSI already in build directory.
Copying packages into build directory...
Traceback (most recent call last):
File "/usr/local/bin/pynsist", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/nsist/__init__.py", line 540, in main
InstallerBuilder(**args).run(makensis=(not options.no_makensis))
File "/usr/local/lib/python2.7/dist-packages/nsist/__init__.py", line 495, in run
self.prepare_packages()
File "/usr/local/lib/python2.7/dist-packages/nsist/__init__.py", line 381, in prepare_packages
py_version=self.py_version, exclude=self.exclude)
File "/usr/local/lib/python2.7/dist-packages/nsist/copymodules.py", line 224, in copy_modules
mc.copy(modname, target, exclude)
File "/usr/local/lib/python2.7/dist-packages/nsist/copymodules.py", line 195, in copy
check_package_for_ext_mods(path, self.py_version)
File "/usr/local/lib/python2.7/dist-packages/nsist/copymodules.py", line 41, in check_package_for_ext_mods
check_ext_mod(os.path.join(path, dirpath, filename), target_python)
File "/usr/local/lib/python2.7/dist-packages/nsist/copymodules.py", line 30, in check_ext_mod
raise ExtensionModuleMismatch(extensionmod_errmsg % ('Windows', path))
nsist.copymodules.ExtensionModuleMismatch: Found an extension module that will not be usable on Windows:
/usr/lib/python2.7/dist-packages/pygame/rwobject.so
Put Windows packages in pynsist_pkgs/ to avoid this.
So the problem I think is with Pygame.
On Google there in nothing about this, but i cannot use others programs for packaging(eg. py2exe, pyinstaller ecc...).
Thanks and sorry for the bad english
Reposting as an answer, since it worked:
If you put pygame in packages=, it tries to copy it from your computer. But on your computer that's pygame for Linux, which won't work on Windows. If you instead put pygame in the pypi_wheels= bit of the config file, Pynsist will take care of downloading a Windows version for you.
Have a look at the pygame example in the Pynsist repository.
Most packages don't have this problem because they only contain Python code, which is the same files on all platforms. Pygame has compiled modules, which have to be compiled for the right platform.

Calling octave .m function from python not executing

I understand this question has been asked multiple times and answered in different forums but it looks like there are variants of the issue and mine is probably, slightly different.
Let me explain. I am trying to call a octave function which I had written for plotting and I don't want to re-write it again python. Therefore I did the following:-
1. install the oct2py
2. setup the OCTAVE_EXECUTABLE= c:\Octave\Octave-4.2.1\bin\octave-gui.exe
3. did the following in the code:-
#importing oct2py
from oct2py import octave as oc
oc.addpath("C:\\personal\\learning\\octave-lib") #containing my octave .m files
#Now I am trying to call a plot function written in octave called displayData.m
oc.displayData(X) # where X is a numpy matrix for plotting
However on executing call to the method gives no errors - but it does not do anything. I see a windows shell prompt opening & closing but nothing else.
I have also tried to replace octave-gui-4.2.1.exe with octave-cli-4.2.1.exe following the suggesting from some sites but I was getting errors that bulk of the windows dll required were not found.
I started with the advice from the oct2py site asking me to just add the path to the folder containing octave.exe ( note that this folder contains all the octave executable) , but that resulted in windows permission errors. There should not be any reason for this error since I am the only user on my windows laptop and have administrative privileges. I am getting the following errors:-
File "mcclassifier.py", line 21, in <module>
from oct2py import octave as oc
File "C:\Users\Sam\Anaconda3\lib\site-packages\oct2py\__init__.py", line
38, in <module>
octave = Oct2Py()
File "C:\Users\Sam\Anaconda3\lib\site-packages\oct2py\core.py", line 73,
in __init__self.restart()
File "C:\Users\Sam\Anaconda3\lib\site-packages\oct2py\core.py", line 508, in restart logger=self.logger)
File "C:\Users\Sam\Anaconda3\lib\site-packages\octave_kernel\kernel.py",
line 144, in __init__
self.repl = self._create_repl()
File "C:\Users\Sam\Anaconda3\lib\site-packages\octave_kernel\kernel.py",
line 338, in _create_repl
version = subprocess.check_output(version_cmd).decode('utf-8')
File "C:\Users\Sam\Anaconda3\lib\subprocess.py", line 336, in check_output
**kwargs).stdout
File "C:\Users\Sam\Anaconda3\lib\subprocess.py", line 403, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Users\Sam\Anaconda3\lib\subprocess.py", line 707, in __init__
restore_signals, start_new_session)
File "C:\Users\Sam\Anaconda3\lib\subprocess.py", line 990, in
_execute_child startupinfo)
PermissionError: [WinError 5] Access is denied
I tried to run it from Spyder IDE and also from the command line. Both have the identical behavior. Its been frustrating , so any suggestion to get me past this issue will be a big help !!
ADDITIONAL INFORMATION:-
Probably I was not very clear above, but what I am trying to do is to execute a plotting function which i had implemented in octave, & is working.
I made some changes to my python code to see if I can instantiate the Oct2Py class and then call feval function. I commented the previous lines of code above and added the following:-
octave=oct2py.Oct2Py()
octave.feval('C:\\personal\\learning\\octave-lib\displayData',Xmat,timeout=80)
I can see from the windows taskbar that octave-gui.exe being invoked and is seen as running in the background. But it is still not plotting and there is no error.
How do I make it run as foreground process and render the plot. What I want to do is similar to what is shown in the oct2py demo example at:-
http://blink1073.github.io/oct2py/source/demo.html.
As you can see that oc.plot([1,2,3],...) renders the plot.
I will greatly appreciate any help here ?

Resources