Python 3.5 and GLIBCXX_3.4.26 not found - python

$ python3 view_model.py -f baselines -e resnet34imnet -cp 180000 -cv 0.9
pygame 1.9.4
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "view_model.py", line 9, in
from drive import CoILAgent
File "/home/vaishu/coiltraine/drive/init.py", line 1, in
from .coil_agent import CoILAgent
File "/home/vaishu/coiltraine/drive/coil_agent.py", line 22, in
from network import CoILModel
File "/home/vaishu/coiltraine/network/init.py", line 3, in
from .optimizer import adjust_learning_rate, adjust_learning_rate_auto
File "/home/vaishu/coiltraine/network/optimizer.py", line 1, in
import dlib
ImportError: /home/vaishu/anaconda3/envs/chandan/bin/../lib/libstdc++.so.6:
version 'GLIBCXX_3.4.26' not found (required by /home/vaishu/anaconda3/envs/chandan/lib/python3.5/site-packages/dlib.cpython-35m-x86_64-linux-gnu.so)

Your anaconda environment is broken in some way.
As a first step make sure you've installed the correct version for your platform (I guess Mac OS X). Once done, set LD_DEBUG environment variable to libs + files, start your python command again and make sure it picks native libraries from inside anaconda package and not somewhere else.

Related

Enthought Canopy not working on Fedora. Giving error related to Zlib not found

I installed canopy from the .sh file provided from the link of the Enthought canopy site and then ran the following command after cd into the Canopy directory.
Ashish#LoneWarrior Canopy]$ ./canopy
Subprocess output:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/Ashish/Canopy/appdata/canopy-2.1.3.3542.rh6-x86_64 /lib/python2.7/site-packages/pyface/gui.py", line 20, in <module>
from .toolkit import toolkit_object
File "/home/Ashish/Canopy/appdata/canopy-2.1.3.3542.rh6-x86_64/lib/python2.7/site-packages/pyface/toolkit.py", line 99, in <module>
_init_toolkit()
File "/home/Ashish/Canopy/appdata/canopy-2.1.3.3542.rh6-x86_64/lib/python2.7/site-packages/pyface/toolkit.py", line 65, in _init_toolkit
be = import_toolkit(ETSConfig.toolkit)
File "/home/Ashish/Canopy/appdata/canopy-2.1.3.3542.rh6-x86_64/lib/python2.7/site-packages/pyface/toolkit.py", line 58, in import_toolkit
__import__(be + 'init')
File "/home/Ashish/Canopy/appdata/canopy-2.1.3.3542.rh6-x86_64/lib/python2.7/site-packages/pyface/ui/qt4/init.py", line 18, in <module>
from pyface.qt import QtCore, QtGui, qt_api
File "/home/Ashish/Canopy/appdata/canopy-2.1.3.3542.rh6-x86_64/lib/python2.7/site-packages/pyface/qt/QtGui.py", line 8, in <module>
from PySide.QtGui import *
This is the main error : ZLIB_1.2.9 not found.
ImportError: /home/Ashish/Canopy/appdata/canopy-2.1.3.3542.rh6-x86_64/bin/../lib/libz.so.1: version `ZLIB_1.2.9' not found (required by /lib64/libpng16.so.16)
I have tried changing the python default to 3 but still it is not working.
I presume the problem is on an Arch-based distribution. The temporary solution in this case is to downgrade libpng to 1.6.28 (this worked in my case). If you don't have it in your cache (`/var/cache/pacman/pkg'), you can download it from https://archive.archlinux.org/packages/l/libpng/
Then, following https://wiki.archlinux.org/index.php/downgrading_packages run in the directory with the downloaded file
# pacman -U libpng-1.6.28-1-x86_64.pkg.tar.xz
(with the correct architecture, of course)
Don't forget to list libpng in /etc/pacman.conf among ignored packages to prevent upgrading. Look for the [options] section and add IgnorePkg = libpng.
Improtant. Keep in mind that downgrading packages is not harmless, therefore, this is only a temporary solution.
The problem is that the libz file in the canopy environment is not compatible with the ZLIB installed in your system.
For a quick fix: just copy the libz.so.1 file from lib directory to your canopy environment.
In my case it was
$ cp /usr/lib/libz.so.1 path-to-Canopy-install-directory/appdata/canopy-2.1.6.3665.rh6-x86_64/lib/libz.so.1

Anaconda Installation error on MAc OS

I am tyying to install anaconda on my mac but at the last step of installtion it gives me following error:
installing: conda-env-2.4.5-py27_0 ...
Python 2.7.11 :: Continuum Analytics, Inc.
creating default environment...
Traceback (most recent call last):
File "/Users/sdb99/anaconda2/pkgs/conda-4.0.5-py27_0/lib/python2.7/site-packages/conda/install.py", line 37, in <module>
import subprocess
File "/Users/sdb99/anaconda2/pkgs/python-2.7.11-0/lib/python2.7/subprocess.py", line 430, in <module>
import pickle
File "/Users/sdb99/anaconda2/pkgs/python-2.7.11-0/lib/python2.7/pickle.py", line 1272, in <module>
import binascii as _binascii
ImportError: dlopen(/Users/sdb99/anaconda2/pkgs/python-2.7.11-0/lib/python2.7/lib-dynload/binascii.so, 2): Library not loaded: #loader_path/../../libz.1.dylib
Referenced from: /Users/sdb99/anaconda2/pkgs/python-2.7.11-0/lib/python2.7/lib-dynload/binascii.so
Reason: image not found
Any idea how i can get ahead from here?
Thanks!
Just update python to the next version and try installing Anaconda again.
I had python 2.7 and then I updated it to python 3 and I was able to install Anaconda graphical installer successfully.

conda and pip not working at all

I am on OS X 10.11.2, Anaconda Python 2.7.10.
I was installing some dependencies, and suddenly, my conda command started not working at all. Many people suggest conda install python=2.7.10 but when I try that (or any command, even just conda) I get:
Traceback (most recent call last): File
"/Users/Can/anaconda/bin/conda", line 5, in
sys.exit(main()) File "/Users/Can/anaconda/lib/python2.7/site-packages/conda/cli/main.py",
line 106, in main
from conda.cli import conda_argparse File "/Users/Can/anaconda/lib/python2.7/site-packages/conda/cli/conda_argparse.py",
line 16, in
from conda.cli.find_commands import find_commands, find_executable File
"/Users/Can/anaconda/lib/python2.7/site-packages/conda/cli/find_commands.py",
line 9, in
from conda.utils import memoized File "/Users/Can/anaconda/lib/python2.7/site-packages/conda/utils.py", line
10, in
import tempfile File "/Users/Can/anaconda/lib/python2.7/tempfile.py", line 32, in
import io as _io File "/Users/Can/anaconda/lib/python2.7/io.py", line 51, in
import _io ImportError: dlopen(/Users/Can/anaconda/lib/python2.7/lib-dynload/_io.so, 2):
Symbol not found: __PyCodecInfo_GetIncrementalDecoder Referenced
from: /Users/Can/anaconda/lib/python2.7/lib-dynload/_io.so Expected
in: dynamic lookup
How can I repair conda, without using conda itself (as I can't)?
UPDATE: I've completely uninstalled and reinstalled Anaconda. It still gives the same error. I've tried pip and it also fails with the same error. I verify it's Anaconda's pip as which pip returns /Users/Can/anaconda2/bin/pip. Why is Anaconda broken?
I had the same issue, it is successfully fixed by just replacing the _io.so file.
sudo find / -name _io.so
copy the path of the _io.so file which DOES NOT belong to python-2.7.11. For example, copy the path of _io.so which is under python-2.7.5:
/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so
Replace the '/Users/Can/anaconda/lib/python2.7/lib-dynload/_io.so' file with the _io.so that you just found.
cp /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so /Users/Can/anaconda/lib/python2.7/lib-dynload/
Then it will work.

Python, Anaconda, pybrain on a Mac

I installed anaconda, but I'm also using pip:
$ conda list scipy
# packages in environment at /Users/bjelline/anaconda:
#
scipy 0.14.0 np19py27_0
$ conda list pybrain
# packages in environment at /Users/bjelline/anaconda:
#
pybrain 0.3 <pip>
These two are supposed to work together, aren't they?
when I do
/Users/bjelline/anaconda/bin/python -c "import pybrain"
I get an error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/bjelline/anaconda/lib/python2.7/site-packages/pybrain/__init__.py", line 1, in <module>
from structure.__init__ import *
File "/Users/bjelline/anaconda/lib/python2.7/site-packages/pybrain/structure/__init__.py", line 1, in <module>
from connections.__init__ import *
File "/Users/bjelline/anaconda/lib/python2.7/site-packages/pybrain/structure/connections/__init__.py", line 1, in <module>
from full import FullConnection
File "/Users/bjelline/anaconda/lib/python2.7/site-packages/pybrain/structure/connections/full.py", line 3, in <module>
from scipy import reshape, dot, outer
ImportError: cannot import name reshape
any thoughts what the problem might be?
the problem wasn't anaconda, or python, or pip. The problem were files called
pybrain.py
and
scipy.py
in the current directory. the current directory is first in sys.path, so these files got loaded instead of the real libraries.
Note to self: never reuse a packages name as your own filename!
Try conda install -f scipy. This will force reinstall scipy.

Problems installing gnuplot on mac os x

I'm getting this error after downloading the .zip file:
Traceback (most recent call last):
File "setup.py", line 15, in <module>
from __init__ import __version__
File "/Users/me/Downloads/gnuplot-py-1.8/__init__.py", line 164, in <module>
from gp import GnuplotOpts, GnuplotProcess, test_persist
ImportError: cannot import name GnuplotOpts
I have gnuplot installed on my machine, if I type gnuplot on the terminal the gnuplot terminal pops up. I'm trying to call it with python and it's saying it's not installed. This may be a path issue, but I'm just trying to make sure EVERYTHING needed is installed. (Path recommendations would be appreciated too)
Mac 10.7 Lion
So guys, the issue was solved by doing :
pip install http://prdownloads.sourceforge.net/gnuplot-py/gnuplot-py-1.8.tar.gz?download
and importing Gnuplot.

Categories