Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation error with the OctoPrint #3

Open
ghost opened this issue May 30, 2017 · 9 comments
Open

Installation error with the OctoPrint #3

ghost opened this issue May 30, 2017 · 9 comments

Comments

@ghost
Copy link

ghost commented May 30, 2017

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

@platsch
Copy link
Owner

platsch commented May 31, 2017

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?

@sjo00
Copy link

sjo00 commented Feb 14, 2018

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.

@platsch
Copy link
Owner

platsch commented Feb 14, 2018

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.

@sjo00
Copy link

sjo00 commented Feb 17, 2018

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
Copy link

sjo00 commented Feb 20, 2018

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.

@platsch
Copy link
Owner

platsch commented Feb 20, 2018

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.

@xpix
Copy link

xpix commented May 16, 2018

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 :)

@rmie
Copy link

rmie commented Jun 9, 2018

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 .

@vector76
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants