I have installed the K4W branch of the open kinect project on Linux 11.10 from https://github.com/renewagner/libfreenect/tree/k4w-wip . I can navigate to the directory libfreenect/build and run the command:
sudo bin/glview
and the output works correctly.
I have also installed the Python wrappers from libfreenect/wrappers/python and I can import the libraries successfully. However if I run a simple code such as
import freenect
freenect.sync_get_depth()
Which I saved as kinect1.py and then ran using the command sudo kinect1.py
I get the following error:
Error: Invalid Index[0]
Error: Can't open device 1.) Is it plugged in? 2.) Read README
However, I can go straight back to running the glview example and it still work find. So I must be missing something with the Python wrapper implementation. I hope someone can help.
Related
I am trying to run a python script to pull a table from MariaDB. I can run it locally on the MariaDB I installed on my device but when I go to run it on my vm it throws the ModuleNotFoundError. If I run 'pip-safe list' it shows both modules are there but when I run the script I get the error above. I have also tried moving the location that the modules are stored to see if it was a directory issue. I think that it's simply an issue with the import syntax with the '.' in mysql.connector but I can't figure out why. If anyone could help me troubleshoot this that would be greatly appreciated.
Code
Error Message
"pip-safe" was installing the modules to a virtualenv within my system. Where as "sudo pip3" would install to a different directory. When I installed mysql-connector-python via "sudo pip3" and ran the same script I didn't get any errors.
I still don't fully understand why python3 wasn't able to find the modules that were istalled via "pip-safe" but the script is working.
So I am trying to install and import pynput in VSCode but its showing me an error every time I try to do it. I used VSCode's in-built terminal to install it using pip and typed the following :
pip install pynput but this error is shown : Fatal error in launcher: Unable to create process using '"c:\users\vicks\appdata\local\programs\python\python38-32\python.exe" "C:\Users\vicks\AppData\Local\Programs\Python\Python38-32\Scripts\pip.exe" install pynput': The system cannot find the file specified
After receiving the following error, I tried using CMD to install it but the same error is shown. I also tried using python pip install pynput and it shows Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases. even though I have python 3.9.7 and I have selected it as my interpreter in VSCode and I have IDLE(Python 64 bit) installed. How may I resolve the following error? Any help regarding the same is appreciated
Thanks in advance :)
There's no such thing as an in-built terminal in VS code. When you open a terminal in VS Code, it opens the default, which on Windows is usually equivalent to opening up CMD.
If you selected Python 3.9.7 as your default interpreter in VS Code, it does not mean that it will visible to your CMD / terminal. It just means that the VS Code IDE will refer to that instance of Python when launching the program from VS Code itself using the green button (or F5), and when scanning your code to point out missing packages, etc.
CMD will only automatically detect your Python if it's in your PATH environment variable. You should add the Python 3.9.7 base and Scripts path to this.
Also, it would be best if you could first uninstall conflicting versions (like your 3.8.x) of Python and remove them from PATH, assuming that this won't cause any problems for you. Perhaps keep a record all the installed packages in this old version of Python for future reference using pip freeze or pip list.
Check if c:\users\vicks\appdata\local\programs\python\python38-32\python.exe exists by typing cd c:\users\vicks\appdata\local\programs\python\python38-32
I have deleted old python versions and installed new python (version 3.5.2) and after i restarted computer I have lost system tray and icons on the desktop. I found some solutions that are based on setting up CCSM over terminal but it's not that simple as it looks like. There is no terminal and no ccsm installed anymore so i have followed one tutorial where you need to click on desktop, create new folder and try to run terminal from /usr/bin/ directory. Because there was no terminal i found xterminal and started with entering commands like DISPLAY=:0 ccsm but i got error "bad interpreter".
Anyways, i found some way to delete and reinstall python and i can see its installed in Python-3.5.0 directory. So i was thinking i start the DISPLAY command thru script and run it with python3.5 someScript.py command. That part was success but then i got error " no ccsm " which is true. So...
1.) i try to install with sudo apt-get install compizconfig-settings-manager
but i got error https://ibb.co/Jdm6BFf
2.) after googling i found some solutions for this but then i land it in the same problem:
https://ibb.co/x8LHFjy
3.) btw. i try to install "minimal" version of python and it was installed but with some errors.
It looks like that path to python is not a problem, because I run the script directly so it must be missing packages, i have no clue how to update it or what to do next...
Purging python and trying to reinstall again ?
Thank you guys for your answers !
E.
I'm trying to run QT Designer from the terminal
pyside6-designer
but get the error message:
venv/lib/python3.8/site-packages/PySide6/designer: error while loading shared libraries: libQt6DesignerComponents.so.6: cannot open shared object file: No such file or directory
Inspecting the folder, I can confirm libQt6DesignerComponents.so.6 exist in the folder:
/venv/lib/python3.8/site-packages/PySide6/Qt/lib
I have re-installed and also tried the alternative PIPENV, but same result. Trying to execute in the same folder it ask me to install qtchooser. But didn't work after installing this.
I am on Ubuntu 20.04. I can find a ticket saying it should be solved. link to solution
I have also tried some random stuff, such as
sudo /sbin/ldconfig -v
which is described here its foss. It didn't work.
Anyone got experience of the same problem and have a solution?
Set your LD_LIBRARY path in shell (bash) after activating a venv:
export LD_LIBRARY_PATH=/home/FILL_IN_USERNAME/PycharmProjects/pythonProject/venv/lib/python3.8/site-packages/PySide6/Qt/lib/
I'm running Kubuntu Groovy Gorilla.
I'm quite excited about trying this out.
I'm quite a newbie to python, and I was trying to install mechanize for python 3.2.5
I looked up where to find it and found this page: https://github.com/adevore/mechanize/tree/python3 which I assume would work with python 3.2.5
However, it says in the install.txt to run "python setup.py install" but does not tell me where to run that code. I tried cmd but it told me: "python is not recognized as an internal or external command, operable program or batch file"
So, instead, I tried the other option it gave me, which was to drag the contents of the mechanize zip file to the site packages folder. That didn't work either.
If anyone could help me install this module, that would be greatly appreciated. Also, I'm using Windows10 64 bit with Python 3.2.5
If you are getting the error
"python is not recognized as an internal or external command, operable program or batch file"
And you have installed python, then the issue is likely to be that the directory where you have installed python is not in your PATH.
(more often than not, python is installed in a folder pythonXX in your C:// Drive)
Get python onto your path
In cmd prompt type in %PATH%. And confirm that the directory is not there.
To place directories into the path run this commands in command prompt, replacing pythonXX with the directory where you have python installed.
set PATH=%PATH%;C:\pythonXX
To make this change more permanent, i suggest you read this article by How-To-Geek.
After you've placed the python directory into your path, test that python does indeed now run from cmd prompt by typing python into cmd prompt and you should see something like this
Python 3.2.25 (default, Oct 19 2015, 18:04:42)
>>>
go nuts :D
Time to install mechanize tree
now get back out of the python interpreter (type in exit or ctrl-d) and make your way towards the directory where mechanize tree is based (use the cd command to move directories and the dir command to list the contents of directories)
Once in there run the command
python setup.py install
and it should work like a charm :)