nimble00 / PTGREY-cameras-with-python

These files explain how to use 'ptgrey' cameras with python. I felt the need to make this because there is not even an introductory code (to take a picture using ptgrey cameras) available on internet. take_a_photo.py is the basic code people usually need but I have added links to a few possibly helpful websites.
61 stars 19 forks source link

ImportError: cannot import name 'PySpin' #3

Open Leungfranklin opened 5 years ago

Leungfranklin commented 5 years ago

The captioned error is displaying in running program. However, I have already 'PIP install pyspin'

iotaka commented 5 years ago

is a different pyspin, they choose name already used by other project more or less for all the tools ...

https://www.flir.com/products/spinnaker-sdk/

this is the correct one

Ranjith-RN commented 4 years ago

ImportError: cannot import name 'PySpin'

iotaka commented 4 years ago

ImportError: cannot import name 'PySpin'

you have to install https://www.flir.com/products/spinnaker-sdk/

talha484 commented 4 years ago

Dear! Kindly list the steps to install the correct one. I am having a tough time doing it.

nimble00 commented 4 years ago

try this: from pyspin import PySpin instead of import PySpin

talha484 commented 4 years ago

Thankyou so much, I will check it out.

Regards, Talha Hsan Aslam Bsc Mechatronics and Control Engineering

On Wed, 13 May 2020, 10:08 am Rahul Nimbal, notifications@github.com wrote:

try this: from pyspin import PySpin instead of import PySpin

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nimble00/PTGREY-cameras-with-python/issues/3#issuecomment-627748847, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMT2ZW2HCBH6QX3BELFBITRRITMDANCNFSM4HL44X5Q .

PavelKatunin commented 4 years ago

Could somebody please tell me how I correctly configure conda or venv on macOS to resolve this naming conflict please ?

nimble00 commented 4 years ago

Please explain more, what is the naming conflict?

emull00 commented 3 years ago

Naming conflict exists because the PySpin software required to interface with spinnaker-related hardware shares the same name as 'pyspin', and also with 'pySPIN', neither of these libraries can be used to operate spinnaker-related hardware - for example, the library 'pyspin' accessible with pip, is a library for a spinning text graphic, not the required library to interface with FLIR cameras: "PySpin'

I've been unable to actually re-install the spinnaker-related 'PySpin' https://www.flir.com/products/spinnaker-sdk/ note that the download is now at :https://flir.app.boxcn.net/v/SpinnakerSDK - but simply reinstalling this does not fix the problem, the entire python PySpin libraries have to be installed:

'PySpin' can be imported from FLIR, but from a slightly different access to the SDK. E.g. for ubuntu: https://flir.app.boxcn.net/v/SpinnakerSDK -> Linux -> Ubuntu18.04 -> python in this directory are all the Spinnaker and platform-dependent packages. E.g running python 3.6 x86 with spinnaker SDK version 2.3.0.77, get spinnaker_python-2.3.0.77-Ubuntu18.04-cp36-cp36m-linux_x86_64.tar.gz

i880 commented 2 years ago

please some body help why the system tell that`s AttribueError

antortjim commented 2 years ago

This instruction did not work for me either

from pyspin import PySpin

but indeed, as hinted at in the comment from @emull00 here https://github.com/nimble00/PTGREY-cameras-with-python/issues/3#issuecomment-797112547 one needs to download TWO .tar.gz from the box site from flir (at least on Ubuntu):

One with the SDK And one with the Python wrappers / modules needed This second one is inside the python folder, which lives in the same folder as the tar.gz for the SK (at least in Ubuntu)

Mind the Python module is distributed as a wheel and only a python 3.8 version is available. But at least 3 different archs are offered.

I was able to solve this issues after installing the sdk

sudo sh install_spinnaker.sh

and the wheel

pip install spinnaker_python-2.5.0.80-cp38-cp38-linux_x86_64.whl