python-hpilo icon indicating copy to clipboard operation
python-hpilo copied to clipboard

Executing hpilo_ca from shell doesn't use virtualenv's version of python

Open hansdg1 opened this issue 7 years ago • 0 comments

I currently have python-hpilo installed and loaded in a virtualenv.

The example file "hpilo_ca" currently has shebang "#!/usr/bin/python". If execute it from the shell like this: ./hpilo_ca -h it can't find the hpilo module.

$ ./hpilo_ca -h                          
Traceback (most recent call last):       
  File "./hpilo_ca", line 10, in <module>
    import hpilo                         
ImportError: No module named hpilo       

Changing the shebang to #!/usr/bin/env python fixes the problem.

hansdg1 avatar Apr 02 '18 21:04 hansdg1