Error installing plugin, could not parse output from pip

setting up a development platform on Windows 10 for plugin developement. Using:
Windows 10
Python 3.8
Octoprint 1.4.0rc3

What is the problem?
Octoprint loads fine. I can access the web interface via localhoast:5000. Builtin plugins load without issue. If I try to add any (get more) plugins I get an immediate error that:

Installing plugin "OctoPrint-SideBarTempGraph" from https://github.com/jneilliii/OctoPrint-SideBarTempGraph/archive/master.zip...
d:\github\octoprint\venv3b\scripts\python.exe -m pip --disable-pip-version-check install https://github.com/jneilliii/OctoPrint-SideBarTempGraph/archive/master.zip --no-cache-dir
Error!
> Could not parse output from pip, see plugin_pluginmanager_console.log for generated output

What did you already try to solve it?
I have updated the origional build, I have tried reinstalling in a fresh environment, I have searched for answers
the pip path may be suspect, but im not fluent enough to know if this is the problem or if it is, how to solve it:

octoprint (3).log (70.1 KB) plugin_pluginmanager_console (6).log (2.2 KB)

This is the last bit from the console that shows the errors:

2019-12-30 16:48:36,673 - octoprint.plugins.pluginmanager - INFO - Installing plugin from https://github.com/jneilliii/OctoPrint-SideBarTempGraph/archive/master.zip
2019-12-30 16:48:36,736 - octoprint.plugin.core - INFO - Plugin Pi Support Plugin did not pass check, not loading.
2019-12-30 16:48:36,810 - octoprint.util.pip - ERROR - Error while trying to run command d:\github\octoprint\venv3b\scripts\python.exe -m pip --disable-pip-version-check install https://github.com/jneilliii/OctoPrint-SideBarTempGraph/archive/master.zip --no-cache-dir
2019-12-30 16:48:36,816 - octoprint.plugins.pluginmanager - ERROR - Installing the plugin from https://github.com/jneilliii/OctoPrint-SideBarTempGraph/archive/master.zip failed, could not parse output from pip. See plugin_pluginmanager_console.log for generated output
2019-12-30 16:58:54,615 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2019-12-30 16:58:58,963 - octoprint.plugins.tracking - INFO - Sent tracking event ping, payload: {'octoprint_uptime': 1803}
    self.run()
  File "d:\github\octoprint\venv3b\lib\site-packages\sentry_sdk\integrations\threading.py", line 69, in run
    self.run()
  File "d:\github\octoprint\venv3b\lib\site-packages\sentry_sdk\integrations\threading.py", line 69, in run
    reraise(*_capture_exception())
  File "d:\github\octoprint\venv3b\lib\site-packages\sentry_sdk\_compat.py", line 57, in reraise
    reraise(*_capture_exception())
  File "d:\github\octoprint\venv3b\lib\site-packages\sentry_sdk\_compat.py", line 57, in reraise
    raise value
  File "d:\github\octoprint\venv3b\lib\site-packages\sentry_sdk\integrations\threading.py", line 67, in run
    raise value
  File "d:\github\octoprint\venv3b\lib\site-packages\sentry_sdk\integrations\threading.py", line 67, in run
    return old_run_func(self, *a, **kw)
  File "c:\users\joshu\appdata\local\programs\python\python38-32\Lib\threading.py", line 870, in run
    return old_run_func(self, *a, **kw)
  File "c:\users\joshu\appdata\local\programs\python\python38-32\Lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "d:\github\octoprint\venv3b\lib\site-packages\sarge\__init__.py", line 1187, in run_node
    self._target(*self._args, **self._kwargs)
  File "d:\github\octoprint\venv3b\lib\site-packages\sarge\__init__.py", line 1187, in run_node
    result = getattr(self, method)(node, input, async_)
  File "d:\github\octoprint\venv3b\lib\site-packages\sarge\__init__.py", line 1333, in run_command_node
    result = getattr(self, method)(node, input, async_)
  File "d:\github\octoprint\venv3b\lib\site-packages\sarge\__init__.py", line 1333, in run_command_node
    node.cmd.run(input=input, async_=async_)
    node.cmd.run(input=input, async_=async_)
  File "d:\github\octoprint\venv3b\lib\site-packages\sarge\__init__.py", line 655, in run
  File "d:\github\octoprint\venv3b\lib\site-packages\sarge\__init__.py", line 655, in run
    self.process = p = Popen(self.args, **self.kwargs)
  File "d:\github\octoprint\venv3b\lib\site-packages\sentry_sdk\integrations\stdlib.py", line 205, in sentry_patched_popen_init
    self.process = p = Popen(self.args, **self.kwargs)
    rv = old_popen_init(self, *a, **kw)  # type: ignore
  File "c:\users\joshu\appdata\local\programs\python\python38-32\Lib\subprocess.py", line 854, in __init__
  File "d:\github\octoprint\venv3b\lib\site-packages\sentry_sdk\integrations\stdlib.py", line 205, in sentry_patched_popen_init
    self._execute_child(args, executable, preexec_fn, close_fds,
    rv = old_popen_init(self, *a, **kw)  # type: ignore
  File "c:\users\joshu\appdata\local\programs\python\python38-32\Lib\subprocess.py", line 1307, in _execute_child
  File "c:\users\joshu\appdata\local\programs\python\python38-32\Lib\subprocess.py", line 854, in __init__
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
TypeError: environment can only contain strings
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "c:\users\joshu\appdata\local\programs\python\python38-32\Lib\subprocess.py", line 1307, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
TypeError: environment can only contain strings

Thanks for any help.

I've had this same exact issue for a while in my python 3 dev environment, but have yet to debug the problem. What does work, however, is that after you activate your virtualenv (d:\github\octoprint\venv3b\Scripts\activate.bat) you can install from the command line using the following.

pip install --upgrade --no-cache-dir https://github.com/jneilliii/OctoPrint-SideBarTempGraph/archive/master.zip

And then when you start up octoprint the installed plugins will load in.

1 Like

so I tried:

pip --disable-pip-version-check install https://github.com/jneilliii/OctoPrint-SideBarTempGraph/archive/master.zip --no-cache-dir

and that works fine so it seems that the invocation may be incorrect, on startup I get this line

2019-12-30 20:18:04,512 - octoprint.util.pip - INFO - Using "d:\github\octoprint\venv3\scripts\python.exe -m pip" as command to invoke pip

maybe the following would be more appropriate?

"d:\github\octoprint\venv3\scripts\pip" as command to invoke pip

If so, where/how would I change this?

Which also works at the command line so......

ps, how did you format the pip install line with the slider in the post?

With the </> button :slight_smile:
Just did it for you :slight_smile:

I use 3 ` characters before and after the text block I want to format that way. The forum uses markdown language.

1 Like

@M0o0P, did you submit an issue on the OctoPrint repo about this yet? I'm sure @foosel will want to know about it since it's specific to Python 3 and the changes with the latest development.

@jnilliii, No, I did not submitt this issue to the repro. I'm new to github and communal development and I'm not sure of the process but I will try to figure it out this weekend and post to the repository so @foosel can review.

Thank you,

moop

No worries. I'll go ahead and post it over there for you and link back to this forum discussion.

Edit: Ticket opened here.