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

gpu_set_up #2

Open
Eavis opened this issue Oct 12, 2018 · 9 comments
Open

gpu_set_up #2

Eavis opened this issue Oct 12, 2018 · 9 comments

Comments

@Eavis
Copy link
Owner

Eavis commented Oct 12, 2018

No description provided.

@Eavis
Copy link
Owner Author

Eavis commented Oct 12, 2018

http://caffe.berkeleyvision.org/install_apt.html
sudo apt install caffe-cpu
sudo apt build-dep caffe-cpu # dependencies for CPU-only version

It requires a deb-src line in your sources.list. Continue with compilation.

@Eavis
Copy link
Owner Author

Eavis commented Oct 12, 2018

install opencv3

Guide is taken from http://www.pyimagesearch.com/2015/07/20/install-opencv-3-0-and-python-3-4-on-ubuntu/

Checkout and compile
git clone https://github.com/opencv/opencv
cd opencv
mkdir build
cd build
cmake ..
make
sudo make install

@Eavis
Copy link
Owner Author

Eavis commented Oct 12, 2018

pip3 install pandas, numpy, tensorflow, scipy

@Eavis
Copy link
Owner Author

Eavis commented Oct 14, 2018

@Eavis
Copy link
Owner Author

Eavis commented Oct 15, 2018

Python 3.6.6 (default, Sep 12 2018, 18:26:19)
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
Type "help", "copyright", "credits" or "license" for more information.

import caffe
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused

(.:21659): Gdk-CRITICAL **: 14:26:38.561: gdk_cursor_new_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

(.:21659): Gdk-CRITICAL **: 14:26:38.562: gdk_cursor_new_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

import numpy as np
import pandas
Traceback (most recent call last):
File "", line 1, in
File "/home/ubuntu/.local/lib/python3.6/site-packages/pandas/init.py", line 57, in
from pandas.io.api import *
File "/home/ubuntu/.local/lib/python3.6/site-packages/pandas/io/api.py", line 19, in
from pandas.io.packers import read_msgpack, to_msgpack
File "/home/ubuntu/.local/lib/python3.6/site-packages/pandas/io/packers.py", line 69, in
from pandas.util._move import (
ValueError: module functions cannot set METH_CLASS or METH_STATIC

@Eavis
Copy link
Owner Author

Eavis commented Oct 15, 2018

For me it seems to be matplotlib that causes this. If you want to run totally headless at the top of your script you can also try:

import matplotlib
matplotlib.use('Agg')
Which will tell matplotlib not to try to load up GTK.

@Eavis
Copy link
Owner Author

Eavis commented Oct 15, 2018

sudo pip uninstall matplotlib
sudo apt-get install python-matplotlib

use python-matplotlib can solve the problom.

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

1 participant