OctoPNP icon indicating copy to clipboard operation
OctoPNP copied to clipboard

Installation error with the OctoPrint

Open ghost opened this issue 8 years ago • 9 comments

Installation does not work. Gives error message:"Could not parse output from pip". I'm using OctoPrint version 1.3.2 master branch.

ghost avatar May 30 '17 19:05 ghost

Hi, I'm unable to reproduce your problem, could you provide more details?

However, there where indeed at least two important issues preventing a successful installation:

  • the pip install link in README.md had a typo and was broken
  • the requirements where not correct. You need to install opencv2 and numpy first.

Both problems should be fixed now, can you try installing again?

platsch avatar May 31 '17 12:05 platsch

I use octoprint, version 1.3.6, on raspberry pi, Linux 4.9.78-v7+ #1084 SMP Thu Jan 25 18:05:49 GMT 2018 armv7l GNU/Linux

Over pluginmanager, the same error "Could not parse output from pip".

from bash: cat /home/pi/.octoprint/logs/plugin_pluginmanager_console.log

/home/pi/oprint/bin/python -m pip install https://github.com/platsch/OctoPNP/archive/master.zip Collecting https://github.com/platsch/OctoPNP/archive/master.zip Downloading https://github.com/platsch/OctoPNP/archive/master.zip Requirement already satisfied: OctoPrint in /home/pi/oprint/lib/python2.7/site-packages/OctoPrint-1.3.6-py2.7.egg (from OctoPNP==0.2) Collecting numpy (from OctoPNP==0.2) Downloading numpy-1.14.0.zip (4.9MB) Collecting opencv-python (from OctoPNP==0.2) ! Could not find a version that satisfies the requirement opencv-python (from OctoPNP==0.2) (from versions: ) ! No matching distribution found for opencv-python (from OctoPNP==0.2)

pip search opencv

opencv-python (3.4.0.12) - Wrapper package for OpenCV python bindings.

/home/pi/oprint/bin/pip install opencv-python

Collecting opencv-python Could not find a version that satisfies the requirement opencv-python (from versions: ) No matching distribution found for opencv-python

pip --version

pip 9.0.1 from /home/pi/oprint/local/lib/python2.7/site-packages (python 2.7)

Could it be a problem with raspberry pi architecture? Tried: https://pypi.python.org/pypi/opencv-python No luck.

Is there an other paket to use possible? Must i build it self?

Reading http://docs.octoprint.org/en/devel/plugins/using.html : Sorry this site does not exist yet.

sjo00 avatar Feb 14 '18 11:02 sjo00

Just checked this issue on one of my octopi installations: the opencv-python package is apparently not available for this architecture... You can try to build opencv on your RasPi, there are several tutorials out there, but I never tested it and it requires some CPU-time.

Not happy with the situation, but I'm not going to provide an opencv package for currently non-supported architectures.

Can you use a different host computer? I'm running Octoprint / OctoPNP on an Odroid and several desktop computers with Debian / Ubuntu.

The documentation link was broken. I fixed it, but it's not providing any further hints anyway.

platsch avatar Feb 14 '18 15:02 platsch

Can you use a different host computer? I'm running Octoprint / OctoPNP on an Odroid and several desktop computers with Debian / Ubuntu.

Sorry, at the moment no time to test it on different host.

Not happy with the situation, but I'm not going to provide an opencv package for currently non-supported architectures.

In the normal repository (http://mirrordirector.raspbian.org/raspbian/ jessie) is python-opencv. Can i use this anyway?

Bye the way, schöne Grüße nach Hamburg von Kiel aus

sjo00 avatar Feb 17 '18 14:02 sjo00

Can you use a different host computer? I'm running Octoprint / OctoPNP on an Odroid and several desktop computers with Debian / Ubuntu.

I tested it in virtualbox debian stretch with octoprint and it works.

sjo00 avatar Feb 20 '18 01:02 sjo00

In the normal repository (http://mirrordirector.raspbian.org/raspbian/ jessie) is python-opencv. Can i use this anyway?

I have no idea... just try it.

I tested it in virtualbox debian stretch with octoprint and it works.

Good! We didn't put much effort into getting it stable on different platforms yet, so any feedback is very welcome! Also if there are further questions, just open an issue and I'll try to add important things to the documentation.

platsch avatar Feb 20 '18 09:02 platsch

Hi, i run in the same Problem and found this solution:

wget "https://github.com/jabelone/OpenCV-for-Pi/raw/master/latest-OpenCV.deb"
sudo dpkg -i latest-OpenCV.deb
home/pi/OctoPrint/venv/bin/python -m pip install --upgrade pip
cd /home/pi/OctoPrint/venv/lib/python2.7
ln -s /usr/local/lib/python2.7/dist-packages/cv2.so .
cd /home/pi/OctoPrint/venv/bin/python -m pip install numpy
cd 
wget https://github.com/platsch/OctoPNP/archive/master.zip
unzip master.zip
cd OctoPNP-master/
vi requirements.txt (remove openvc entry)
/home/pi/OctoPrint/venv/bin/python ./setup.py install
sudo /etc/init.d/octoprint restart

But i run in an javascript error, but i'll write a new issue about this topic :)

xpix avatar May 16 '18 12:05 xpix

similar solution for OctoPi and opencv:

sudo apt-get install python-opencv cd ~/oprint/lib/python2.7 ln -s /usr/lib/python2.7/dist-packages/cv2.arm-linux-gnueabihf.so . ln -s /usr/lib/python2.7/dist-packages/cv.py .

rmie avatar Jun 09 '18 21:06 rmie

Thanks to @rmie for the tip on getting python-opencv and getting it linked into OctoPi's python environment.

I removed opencv from the requirements like @xpix said (used a fork on GitHub).

For whatever reason numpy didn't work automatically from OctoPrint's plugin system. I was able to compile manually using ~/oprint/bin/pip install numpy but it took a while. Trying to follow rmie's approach to link system level packages, I was able to get it this way without compiling:

cd ~/oprint/lib/python2.7/site-packages/
ln -s /usr/lib/python2.7/dist-packages/numpy .
ln -s /usr/lib/python2.7/dist-packages/numpy-1.12.1.egg-info .

After that (still using my fork with opencv removed from requirements) I was able to get it installed and working on Raspberry Pi.

So for anyone else that finds this, use rmie's steps, and my steps above, and then through the plugin manager install the plugin from https://github.com/vector76/OctoPNP/archive/master.zip (or disable opencv yourself like xpix recommends).

Thanks all, and thanks to @platsch for leading the way in the first place.

vector76 avatar Aug 20 '19 06:08 vector76