alliedvision / VimbaPython

Old Allied Vision Vimba Python API. The successor to this API is VmbPy
BSD 2-Clause "Simplified" License
93 stars 40 forks source link

Unable to Install VimbaPython #133

Open Jaysus119 opened 1 year ago

Jaysus119 commented 1 year ago

Hi All,

New user here and my apologies if this isn't the right place for this inquiry in GitHub, but I've turned up empty-handed with my Google searches.

I've used Allied Vision cameras for a few years now, but am new to using the SDK and am attempting to get started using the Python wrapper, VimbaPython.

I've successfully installed VimbaSDK (version 6.0) on my PC running Oracle Linux Server 9.0. Following the VimbaPython installation instructions in ./Vimba_6_0/VimbaPython/Documentation I'm now trying to run the Install.sh script, but I'm getting an error that tells me no virtual environment detected.

For additional background:

However, when I run the Install.sh script I get the following output:

      (Vimba) [baxuser@localhost VimbaPython]$ sudo ./Install.sh -d
      [sudo] password for baxuser: 
      ###############################
      # VimbaPython install script. #
      ###############################
      No virtual environment detected
      Searching for python in /sbin /bin /usr/sbin /usr/bin
      Error: No compatible Python version with pip support found. Abort.

Any guidance would be greatly appreciated!

Kind regards, Jay

Teresa-AlliedVision commented 1 year ago

Hello Jay, the install.sh script is testing if it is running inside a virual env and doesn't seem to recognize the pyenv you have running. function inside_virtual_env { if [ -z "$VIRTUAL_ENV" ]; then echo "false" else echo "true" fi } VIRTUAL_ENV should be set when executing activate script. Was that modified by any chance? Can you try to reinstall pyenv from scratch? Cheers, Teresa

NiklasKroeger-AlliedVision commented 1 year ago

The Install.sh script is only intended to be a helper for users who are not comfortable invoking pip commands manually. It was written without considering pyenv, which is why the pyenv interpreters are not detected correctly.

Installation of VimbaPython can easily be done, by executing pip install <path/to/VimbaPython>. This will install VimbaPython into the site-packages directory of whatever Python interpreter the pip command targets. If you have set up pyenv, the pip shim provided by it should take care of selecting the correct Python interpreter for you.

See also a very similar issue here: #135