PTGREY-cameras-with-python icon indicating copy to clipboard operation
PTGREY-cameras-with-python copied to clipboard

ImportError: cannot import name 'PySpin'

Open Leungfranklin opened this issue 5 years ago • 11 comments

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

Leungfranklin avatar May 09 '19 18:05 Leungfranklin

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

iotaka avatar May 16 '19 13:05 iotaka

ImportError: cannot import name 'PySpin'

Ranjith-RN avatar Feb 18 '20 20:02 Ranjith-RN

ImportError: cannot import name 'PySpin'

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

iotaka avatar Feb 27 '20 17:02 iotaka

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

talha484 avatar Apr 30 '20 02:04 talha484

try this: from pyspin import PySpin instead of import PySpin

nimble00 avatar May 13 '20 05:05 nimble00

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, [email protected] 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 .

talha484 avatar May 13 '20 13:05 talha484

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

PavelKatunin avatar Jul 09 '20 17:07 PavelKatunin

Please explain more, what is the naming conflict?

nimble00 avatar Jul 11 '20 12:07 nimble00

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

emull00 avatar Mar 11 '21 23:03 emull00

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

i880 avatar Nov 04 '21 23:11 i880

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

antortjim avatar Nov 24 '21 18:11 antortjim