I'm trying to use this function vtkGDALVectorReader from the vtk library.
Everytime I try to use it, it says it doesn't exist. I've tried a few different version of vtk now and even looked at peoples code where I know this works.
I see it on the github, I see it in the docs.. why is it not working in python? I am using pip installed verison - perhaps I have to build from source?
Is there some additional step to install GDAL capabilities in VTK ??
import vtk
vtk.vtkGDALVectorReader()
Related
I have a c++ library (e.g. called libmyvideo) for video processing which links to opencv, including opencv_videoio. I have then written a python module (e.g called myvideopy) which contains an extension module that links to libmyvideo. The myvideopy module also needs to use opencv, which I have installed via pip and imported using import cv2.
When I import myvideopy I see the following warning message in the console:
objc[34948]: Class CaptureDelegate is implemented in both /opt/homebrew/Cellar/opencv/4.7.0_1/lib/libopencv_videoio.4.7.0.dylib (0x1011d4860) and <environment location>/lib/python3.10/site-packages/cv2/cv2.abi3.so (0x1416124d0). One of the two will be used. Which one is undefined.
I understand the issue here is that CaptureDelegate can be found in both opencv libraries - one installed via homebrew and the other that came with the python installation. I haven't encountered an error as a result but would like to avoid the undefined behaviour.
I have ensured that only the required opencv libraries are linked to (core, videoio, imgproc and imgcodecs). However, using videoio will be necessary in both the extension module and the python code so I do not see how I can avoid the duplicate implementation.
Does this matter? And if so, how can I ensure that the appropriate CaptureDelegate is used?
I'm able to make changes to both libmyvideo and myvideopy to solve this.
Software and versions:
MacOS 13.2 (arm)
Python 3.10.9
opencv-python 4.7.0.68
opencv (homebrew) 4.7.0
I'm trying to control my Elgato Stream Deck via Python, and am trying to follow the steps here: https://python-elgato-streamdeck.readthedocs.io/en/stable/pages/backend_libusb_hidapi.html
There are further instructions here:
https://github.com/libusb/hidapi#build-instructions
Unfortunately I can't get anything to work, and I know I'm not setting things up properly because I'm not sure what to do with the downloaded .dll and .lib files. In Pycharm, I always get the error:
('Probe failed to find any functional HID backend.', {'libusb': TransportError("No suitable LibUSB HIDAPI library found on this system. Is the 'hidapi.dll' library installed?")})
The instructions I can find seem more advanced than what I know how to do.
Thanks for any help or suggestions.
Assuming you are on Fedora? I have seen this error and the following should resolve the problem:
sudo dnf install hidapi
I am working on a signal generator AD9833 and i am using a RaspberryPi with it.I found a python library for working with it.
The link to the library is - https://github.com/KipCrossing/Micropython-AD9833
When i try to use this library as explained in the code below, i am not able to import the module 'pyb'. I am not able to link or install from pyb import Pin.
I tried various approaches.I tried this link https://pybuilder.github.io/documentation/tutorial.html#.Xd6HOOhKiUk, which describes about virtual environment. I am able to get the things as enter image description here, but ultimately after many hours of try, i am at same place from where i started. Please guide. I am new to programming.
I even installed the Miropython as suggested, but still the term from pyb import Pin is not recognized.
Testing Micropython installation
try to install PyBoard package
pip install PyBoard
I copied the convert.py file from https://github.com/ethereon/caffe-tensorflow for translating caffe files to tensorflow format. I'm not able to Import kaffe. I tried to pip install but couldnt find a Version that satisfied the requirement kaffe.
Error: unknown type, unable to resolve "kaffe", IntelliSense may be missing
How can I download or Import this module?
Thanks!
In general, downloading single files from github isn't a good idea. If you aren't able to pip your module, better clone whole repository. Every well documented module has a manual on how to install.
Also, when using pip make sure what is the name of the module in pypi.
PS: check this question, maybe it somehow resolves your problem.
I'm fairly new to Python so this maybe really simple. I'm wanting to use the YouTube API to pull my latest YouTube videos. The problem is Python isn't allowing me to do so. I'm running Python version 2.7.6
I've used pip to install the Google dependencies:
$ pip install --upgrade google-api-python-client
To no avail, I'm still getting the following problem:
Unresolved reference 'build'
The code I'm using is: https://developers.google.com/youtube/v3/code_samples/python#retrieve_my_uploads
I'm wondering if anybody has come across this. I'm using PyCharm as my IDE for OS X. I've searched and searched and can't find a solution. I've tried Python versions: 2.6.9, 2.7.6, 3.4.2
I'd really appreciate some advice.
Checkout the following answer :
ImportError: No module named apiclient.discovery
apiclient was the original name of the library.
At some point, it was switched over to be googleapiclient.
# bad
from apiclient.discovery import build
# good
from googleapiclient.discovery import build