pymc-devs / pymc2

THIS IS THE **OLD** PYMC PROJECT (VERSION 2). PLEASE USE PYMC INSTEAD:
http://pymc-devs.github.com/pymc/
Other
879 stars 229 forks source link

pymc test crashed the python itself #157

Closed anamika168 closed 7 years ago

anamika168 commented 7 years ago

python Python 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information.

import pymc pymc.test() Running unit tests for pymc.tests NumPy version 1.12.1 NumPy relaxed strides checking option: True NumPy is installed in /usr/local/lib/python2.7/dist-packages/numpy Python version 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609] nose version 1.3.7 ..E.......S..Illegal instruction (core dumped)

fonnesbeck commented 7 years ago

I would anticipate this is due to an incompatibility among your installed library, often related to the Fortran used to build PyMC. How did you install PyMC and Numpy, and which gfortran are you using?

anamika168 commented 7 years ago

sorry, for the delay in response. Please help me to install your library Pymc properly. I have installed all dependencies as stated on the web page but still problem continue. As you asked: PyMc via git Numpy via pip gfortran with gcc 5.4.0

thank you very much for your cooperation

Best Regards Anamika Pandey

On Fri, Apr 21, 2017 at 5:56 PM, Chris Fonnesbeck notifications@github.com wrote:

I would anticipate this is due to an incompatibility among your installed library, often related to the Fortran used to build PyMC. How did you install PyMC and Numpy, and which gfortran are you using?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pymc-devs/pymc/issues/157#issuecomment-296214074, or mute the thread https://github.com/notifications/unsubscribe-auth/ASoFZMk6w1mJaNfDGqMuMTjZgvELytUlks5ryMOigaJpZM4NETbX .

-- anamika

anamika168 commented 7 years ago

For more inside after cloning the pymc when I follow the further instruction for the installation on Ubuntu the output is following 1.) python setup.py config_fc --fcompiler gfortran build


pandeya@KW12092:~/git/pymc$ sudo python setup.py config_fc --fcompiler gfortran build /usr/local/lib/python2.7/dist-packages/numpy/distutils/system_info.py:572: UserWarning: Atlas (http://math-atlas.sourceforge.net/) libraries not found. Directories to search for the libraries can be specified in the numpy/distutils/site.cfg file (section [atlas]) or by setting the ATLAS environment variable. self.calc_info() /usr/bin/ld: cannot find -lcblas collect2: error: ld returned 1 exit status /usr/bin/ld: cannot find -lcblas collect2: error: ld returned 1 exit status running config_fc unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options running build running config_cc unifing config_cc, config, build_clib, build_ext, build commands --compiler options running build_src build_src building extension "pymc.flib" sources f2py options: ['skip:ppnd7'] adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources. adding 'build/src.linux-x86_64-2.7' to include_dirs. adding 'build/src.linux-x86_64-2.7/pymc/flib-f2pywrappers.f' to sources. building extension "pymc.LazyFunction" sources building extension "pymc.Container_values" sources building extension "pymc.gp.linalg_utils" sources f2py options: [] adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources. adding 'build/src.linux-x86_64-2.7' to include_dirs. adding 'build/src.linux-x86_64-2.7/pymc/gp/linalg_utils-f2pywrappers.f' to sources. building extension "pymc.gp.incomplete_chol" sources f2py options: [] adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources. adding 'build/src.linux-x86_64-2.7' to include_dirs. adding 'build/src.linux-x86_64-2.7/pymc/gp/incomplete_chol-f2pywrappers.f' to sources. building extension "pymc.gp.cov_funs.isotropic_cov_funs" sources f2py options: [] adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources. adding 'build/src.linux-x86_64-2.7' to include_dirs. adding 'build/src.linux-x86_64-2.7/pymc/gp/cov_funs/isotropic_cov_funs-f2pywrappers.f' to sources. building extension "pymc.gp.cov_funs.distances" sources f2py options: [] adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources. adding 'build/src.linux-x86_64-2.7' to include_dirs. build_src: building npy-pkg config files running build_py running build_ext customize UnixCCompiler customize UnixCCompiler using build_ext resetting extension 'pymc.flib' language from 'c' to 'f77'. resetting extension 'pymc.gp.linalg_utils' language from 'c' to 'f77'. resetting extension 'pymc.gp.incomplete_chol' language from 'c' to 'f77'. resetting extension 'pymc.gp.cov_funs.isotropic_cov_funs' language from 'c' to 'f77'. resetting extension 'pymc.gp.cov_funs.distances' language from 'c' to 'f77'. customize Gnu95FCompiler Found executable /usr/bin/gfortran customize Gnu95FCompiler using build_ext


2.) python setup.py install


pandeya@KW12092:~/git/pymc$ sudo python setup.py install /usr/local/lib/python2.7/dist-packages/numpy/distutils/system_info.py:572: UserWarning: Atlas (http://math-atlas.sourceforge.net/) libraries not found. Directories to search for the libraries can be specified in the numpy/distutils/site.cfg file (section [atlas]) or by setting the ATLAS environment variable. self.calc_info() /usr/bin/ld: cannot find -lcblas collect2: error: ld returned 1 exit status /usr/bin/ld: cannot find -lcblas collect2: error: ld returned 1 exit status running install running build running config_cc unifing config_cc, config, build_clib, build_ext, build commands --compiler options running config_fc unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options running build_src build_src building extension "pymc.flib" sources f2py options: ['skip:ppnd7'] adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources. adding 'build/src.linux-x86_64-2.7' to include_dirs. adding 'build/src.linux-x86_64-2.7/pymc/flib-f2pywrappers.f' to sources. building extension "pymc.LazyFunction" sources building extension "pymc.Container_values" sources building extension "pymc.gp.linalg_utils" sources f2py options: [] adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources. adding 'build/src.linux-x86_64-2.7' to include_dirs. adding 'build/src.linux-x86_64-2.7/pymc/gp/linalg_utils-f2pywrappers.f' to sources. building extension "pymc.gp.incomplete_chol" sources f2py options: [] adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources. adding 'build/src.linux-x86_64-2.7' to include_dirs. adding 'build/src.linux-x86_64-2.7/pymc/gp/incomplete_chol-f2pywrappers.f' to sources. building extension "pymc.gp.cov_funs.isotropic_cov_funs" sources f2py options: [] adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources. adding 'build/src.linux-x86_64-2.7' to include_dirs. adding 'build/src.linux-x86_64-2.7/pymc/gp/cov_funs/isotropic_cov_funs-f2pywrappers.f' to sources. building extension "pymc.gp.cov_funs.distances" sources f2py options: [] adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources. adding 'build/src.linux-x86_64-2.7' to include_dirs. build_src: building npy-pkg config files running build_py running build_ext customize UnixCCompiler customize UnixCCompiler using build_ext resetting extension 'pymc.flib' language from 'c' to 'f77'. resetting extension 'pymc.gp.linalg_utils' language from 'c' to 'f77'. resetting extension 'pymc.gp.incomplete_chol' language from 'c' to 'f77'. resetting extension 'pymc.gp.cov_funs.isotropic_cov_funs' language from 'c' to 'f77'. resetting extension 'pymc.gp.cov_funs.distances' language from 'c' to 'f77'. customize Gnu95FCompiler Found executable /usr/bin/gfortran customize Gnu95FCompiler customize Gnu95FCompiler using build_ext running install_lib running install_egg_info Removing /usr/local/lib/python2.7/dist-packages/pymc-2.3.6.egg-info Writing /usr/local/lib/python2.7/dist-packages/pymc-2.3.6.egg-info running install_clib customize UnixCCompiler


fonnesbeck commented 7 years ago

Are you using Anaconda? The easiest way to get a functioning version is via conda:

conda install pymc

Alternately you can install pymc via pip:

pip install -U pymc

Please ensure that older versions of the packages are uninstalled.

anamika168 commented 7 years ago

so u mean installing via github is a problem ?

anamika168 commented 7 years ago

well problem still retain :(

pandeya@KW12092:~$ sudo pip install -U pymc
The directory '/home/pandeya/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/pandeya/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pymc
  Downloading pymc-2.3.6.tar.gz (348kB)
    100% |████████████████████████████████| 358kB 886kB/s 
Installing collected packages: pymc
  Running setup.py install for pymc ... done
Successfully installed pymc-2.3.6
pandeya@KW12092:~$ python
Python 2.7.12 (default, Nov 19 2016, 06:48:10) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pymc
>>> pymc.test()
Running unit tests for pymc.tests
NumPy version 1.12.1
NumPy relaxed strides checking option: True
NumPy is installed in /usr/local/lib/python2.7/dist-packages/numpy
Python version 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]
nose version 1.3.7
..E.......S..Illegal instruction (core dumped)
pandeya@KW12092:~$ 
anamika168 commented 7 years ago

Hi there, may I get some solution of my problem? I really dont get it, It seems that installation is proper but test is not working. Is there any other test available?

fonnesbeck commented 7 years ago

The easiest way to get around this is to install Anaconda and install the binary from conda (if you really need this to get working quickly).

To get things working in your Python environment, I would want you go to into your Python library directory and get rid of all Numpy and PyMC files and start from scratch. I can't replicate this and nobody else has reported the issue, so I strongly suspect that you have some old, bad files hanging around somewhere.

Its also good practice to use a virtualenv, so that when these sorts of issues arise you can easily create a new environment and start from scratch.

anamika168 commented 7 years ago

thanks for your reply let me try these solution.

On 04/23/2017 10:16 PM, Chris Fonnesbeck wrote:

The easiest way to get around this is to install Anaconda and install the binary from conda (if you really need this to get working quickly).

To get things working in your Python environment, I would want you go to into your Python library directory and get rid of all Numpy and PyMC files and start from scratch. I can't replicate this and nobody else has reported the issue, so I strongly suspect that you have some old, bad files hanging around somewhere.

Its also good practice to use a virtualenv, so that when these sorts of issues arise you can easily create a new environment and start from scratch.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pymc-devs/pymc/issues/157#issuecomment-296481754, or mute the thread https://github.com/notifications/unsubscribe-auth/ASoFZBK53OjRg-5IM2wB5F1GJotZ5dBDks5ry6OCgaJpZM4NETbX.

fonnesbeck commented 7 years ago

Have not heard back -- I will close this for now. Feel free to reopen if this is still an issue.