Skip to main content
replaced http://askubuntu.com/ with https://askubuntu.com/
Source Link

If you see herehere, this is not a raspberry related issue, but more a standard virtualenv issue. Seems that not all aliases, packets and libraries of virtualenv are correctly loaded when using sudo.

The link recommends to run directly the virtual environment's Python executable with sudo. Something like:

sudo ./<virtualenv name>/bin/python <script>

If you see here, this is not a raspberry related issue, but more a standard virtualenv issue. Seems that not all aliases, packets and libraries of virtualenv are correctly loaded when using sudo.

The link recommends to run directly the virtual environment's Python executable with sudo. Something like:

sudo ./<virtualenv name>/bin/python <script>

If you see here, this is not a raspberry related issue, but more a standard virtualenv issue. Seems that not all aliases, packets and libraries of virtualenv are correctly loaded when using sudo.

The link recommends to run directly the virtual environment's Python executable with sudo. Something like:

sudo ./<virtualenv name>/bin/python <script>
Source Link
King Midas
  • 208
  • 1
  • 2
  • 13

If you see here, this is not a raspberry related issue, but more a standard virtualenv issue. Seems that not all aliases, packets and libraries of virtualenv are correctly loaded when using sudo.

The link recommends to run directly the virtual environment's Python executable with sudo. Something like:

sudo ./<virtualenv name>/bin/python <script>