Closed amorand007 closed 4 years ago
there are a lot of unnecessary spaces in your changes. is that a copy and paste problem? or do you have spaces in your directory arguments?
I was already able to fix the directories error, thanks for the support. Now I want to build the c ++ library ellen, but when I type "make" in terminal, I get this error:
mkdir -p ./libs make: *** There is no rule to build the target 'libs / elgp.so' , required for 'program'. Stop.
I look forward to your comments
Thanks
it should be lib
, not libs
. Could you please send the complete output of your terminal and a step by step description of your process?
William:
I attach a file where I describe my installation process step by step.
I am new to using ubuntu / linux.
Thanks for the support.
Cheers...
El lun., 23 mar. 2020 a las 9:50, William La Cava (notifications@github.com) escribió:
it should be lib, not libs. Could you please send the complete output of your terminal and a step by step description of your process?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/EpistasisLab/ellyn/issues/5#issuecomment-602687614, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOK6GGLHNSFTQOWQZFL7FQTRI6AMZANCNFSM4LLTVYLA .
I didn't receive the attachment. I don't think you can attach things to github email replies. Can you paste the contents?
@amorand007 I received your slides via email and worked on it a bit. I think I have two potential solutions for you:
regarding
no existe el archivo o el directo #include "pyconfig.h"
type locate pyconfig.h
. it should pull up in /home/$USER/anaconda3/include/python3.7m/
. wherever that file is, you need to include its path via the CFLAGS.
This was my first time installing with python3.7, and I ran into another issue:
runEllenGP.cpp:45:10: fatal error: numpy/ndarrayobject.h: No such file or directory
include <numpy/ndarrayobject.h>
^
~~~~~~
same procedure:
$ locate ndarrayobject.h
/home/$user/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h
so I added /home/$user/anaconda3/lib/python3.7/site-packages/numpy/core/include/
to CFLAGS.
I noticed during this process that there is an easier way to handle boost dependencies with Ubuntu, since there is a debian package that comes with boost-python precompiled.
sudo apt-get install libboost1.65-all-dev
this will put libboost_python3.so somewhere in /usr/. you can find it like so:
$ find /usr/ -name "libboost_python*"
/usr/lib/x86_64-linux-gnu/libboost_python3.so
...
this gives us the following CFLAGS, LDFLAGS, and LDFLAGS2:
CFLAGS= -c -fPIC -I /usr/include/eigen3 -I /home/$USER/anaconda3/include/python3.7m/ -std=c++0x -fopenmp -Ofast -I /home/$USER/anaconda3/lib/python3.7/site-packages/numpy/core/include/
LDFLAGS= -std=c++0x -fopenmp -Ofast -shared -lpython3.7m
LDFLAGS2= -L/home/$USER/anaconda3/lib/ -lboost_python3
There may be a bug in the boost 1.62.0 package that causes the build to fail for python3.7. boost 1.65.1 works fine.
after this, you can check that the module imports from the repo root directory as such
$ python
>>> from ellyn import ellyn
it will complain if packages are missing. you can install any missing packages from pip (probably).
@amorand007 any luck?
William:
First of all thanks for the support. However, I still have this error:
ModuleNotFoundError: No module named 'ellyn'
I followed every step in the mail and got these results:
Step 1 locate pyconfig.h (base) andres@andres-Nitro-AN515-51:~/ellyn-master/ellyn/ellen$ locate pyconfig.h /home/andres/anaconda3/include/python3.7m/pyconfig.h /home/andres/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/_numpyconfig.h /home/andres/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/numpyconfig.h /home/andres/anaconda3/pkgs/numpy-base-1.18.1-py37hde5b4d6_1/lib/python3.7/site-packages/numpy/core/include/numpy/_numpyconfig.h /home/andres/anaconda3/pkgs/numpy-base-1.18.1-py37hde5b4d6_1/lib/python3.7/site-packages/numpy/core/include/numpy/numpyconfig.h /home/andres/anaconda3/pkgs/python-3.7.6-h0371630_2/include/python3.7m/pyconfig.h
Step 2 locate ndarrayobject.h
(base) andres@andres-Nitro-AN515-51:~/ellyn-master/ellyn/ellen$ locate ndarrayobject.h /home/andres/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h /home/andres/anaconda3/pkgs/numpy-base-1.18.1-py37hde5b4d6_1/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h
Step 3 sudo apt-get install libboost1.65-all-dev
(base) andres@andres-Nitro-AN515-51:~/ellyn-master/ellyn/ellen$ find /usr/ -name "libboost_python*" /usr/lib/x86_64-linux-gnu/libboost_python-py27.so /usr/lib/x86_64-linux-gnu/libboost_python-py36.so /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.65.1 /usr/lib/x86_64-linux-gnu/libboost_python3.so /usr/lib/x86_64-linux-gnu/libboost_python.a /usr/lib/x86_64-linux-gnu/libboost_python3.a /usr/lib/x86_64-linux-gnu/libboost_python-py36.a /usr/lib/x86_64-linux-gnu/libboost_python3-py36.a /usr/lib/x86_64-linux-gnu/libboost_python3-py36.so /usr/lib/x86_64-linux-gnu/libboost_python.so /usr/lib/x86_64-linux-gnu/libboost_python-py27.a /usr/lib/x86_64-linux-gnu/libboost_python3-py36.so.1.65.1
Step 4 CFLAGS, LDFLAGS, and LDFLAGS2:
CFLAGS= -c -fPIC -I /usr/include/eigen3 -I /home/$USER/anaconda3/include/python3.7m/ -std=c++0x -fopenmp -Ofast -I /home/$USER/anaconda3/lib/python3.7/site-packages/numpy/core/include/ LDFLAGS= -std=c++0x -fopenmp -Ofast -shared -lpython3.7m LDFLAGS2= -L/home/$USER/anaconda3/lib/ -lboost_python3
Step 5 cd ellyn/ellen....make
(base) andres@andres-Nitro-AN515-51:~/ellyn-master/ellyn/ellen$ make mkdir -p ./lib
Step 6
(base) andres@andres-Nitro-AN515-51:~/ellyn-master/ellyn/ellen$ python Python 3.7.6 (default, Jan 8 2020, 19:59:22) [GCC 7.3.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information.
from ellyn import elly Traceback (most recent call last): File "
", line 1, in ModuleNotFoundError: No module named 'ellyn'
El mar., 28 abr. 2020 a las 10:01, William La Cava (< notifications@github.com>) escribió:
@amorand007 https://github.com/amorand007 any luck?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/EpistasisLab/ellyn/issues/5#issuecomment-620661892, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOK6GGJMUNLSAVTBPZ2AWQLRO3VTBANCNFSM4LLTVYLA .
William
It seems to work already. I just had to change the working directory and download the DistanceClassifier-master function folder.
But now I have this problem running this code in spyder:
from ellyn import ellyn learner = ellyn (g = 100, popsize = 25, selection = 'lexicase')
runfile ('/ home / andres / ellyn-master / ellyn / M4GP.py') Reloaded modules: ellyn, ellen.lib.elgp Traceback (most recent call last):
File "/home/andres/ellyn-master/ellyn/M4GP.py", line 11, in
File "/home/andres/ellyn-master/ellyn/ellyn.py", line 39, in wrapper fun (self, * args, ** kargs)
File "/home/andres/ellyn-master/ellyn/ellyn.py", line 118, in init self.seeds = seeds.split (',')
AttributeError: 'NoneType' object has no attribute 'split'...
El mar., 28 abr. 2020 a las 20:08, Moran Duran, Andres (< amorand@ito-depi.edu.mx>) escribió:
William:
First of all thanks for the support. However, I still have this error:
ModuleNotFoundError: No module named 'ellyn'
I followed every step in the mail and got these results:
Step 1 locate pyconfig.h (base) andres@andres-Nitro-AN515-51:~/ellyn-master/ellyn/ellen$ locate pyconfig.h /home/andres/anaconda3/include/python3.7m/pyconfig.h
/home/andres/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/_numpyconfig.h
/home/andres/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/numpyconfig.h
/home/andres/anaconda3/pkgs/numpy-base-1.18.1-py37hde5b4d6_1/lib/python3.7/site-packages/numpy/core/include/numpy/_numpyconfig.h
/home/andres/anaconda3/pkgs/numpy-base-1.18.1-py37hde5b4d6_1/lib/python3.7/site-packages/numpy/core/include/numpy/numpyconfig.h
/home/andres/anaconda3/pkgs/python-3.7.6-h0371630_2/include/python3.7m/pyconfig.h
Step 2 locate ndarrayobject.h
(base) andres@andres-Nitro-AN515-51:~/ellyn-master/ellyn/ellen$ locate ndarrayobject.h
/home/andres/anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h
/home/andres/anaconda3/pkgs/numpy-base-1.18.1-py37hde5b4d6_1/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h
Step 3 sudo apt-get install libboost1.65-all-dev
(base) andres@andres-Nitro-AN515-51:~/ellyn-master/ellyn/ellen$ find /usr/ -name "libboost_python*" /usr/lib/x86_64-linux-gnu/libboost_python-py27.so /usr/lib/x86_64-linux-gnu/libboost_python-py36.so /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.65.1 /usr/lib/x86_64-linux-gnu/libboost_python3.so /usr/lib/x86_64-linux-gnu/libboost_python.a /usr/lib/x86_64-linux-gnu/libboost_python3.a /usr/lib/x86_64-linux-gnu/libboost_python-py36.a /usr/lib/x86_64-linux-gnu/libboost_python3-py36.a /usr/lib/x86_64-linux-gnu/libboost_python3-py36.so /usr/lib/x86_64-linux-gnu/libboost_python.so /usr/lib/x86_64-linux-gnu/libboost_python-py27.a /usr/lib/x86_64-linux-gnu/libboost_python3-py36.so.1.65.1
Step 4 CFLAGS, LDFLAGS, and LDFLAGS2:
CFLAGS= -c -fPIC -I /usr/include/eigen3 -I /home/$USER/anaconda3/include/python3.7m/ -std=c++0x -fopenmp -Ofast -I /home/$USER/anaconda3/lib/python3.7/site-packages/numpy/core/include/ LDFLAGS= -std=c++0x -fopenmp -Ofast -shared -lpython3.7m LDFLAGS2= -L/home/$USER/anaconda3/lib/ -lboost_python3
Step 5 cd ellyn/ellen....make
(base) andres@andres-Nitro-AN515-51:~/ellyn-master/ellyn/ellen$ make mkdir -p ./lib
Step 6
(base) andres@andres-Nitro-AN515-51:~/ellyn-master/ellyn/ellen$ python Python 3.7.6 (default, Jan 8 2020, 19:59:22) [GCC 7.3.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information.
from ellyn import elly Traceback (most recent call last): File "
", line 1, in ModuleNotFoundError: No module named 'ellyn' El mar., 28 abr. 2020 a las 10:01, William La Cava (< notifications@github.com>) escribió:
@amorand007 https://github.com/amorand007 any luck?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/EpistasisLab/ellyn/issues/5#issuecomment-620661892, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOK6GGJMUNLSAVTBPZ2AWQLRO3VTBANCNFSM4LLTVYLA .
AttributeError: 'NoneType' object has no attribute 'split'...
Whoops, this is an old issue (#4 ) that I thought I already fixed. Please pull the latest commit (cf6ef96e71b551d17dbcc5b24414a4fd70100a4d). Let me know if that solves it.
Hi...
I'm having trouble configuring the "makefile" file in the "ellen" repo I changed line 2 to point to my folders CFLAGS = -c -fPIC -I / usr / include / eigen3 -I /usr/include/python3.6m -std = c ++ 0x -fopenmp -Ofast
also change line 3 and 7 line 6: LDFLAGS = -std = c ++ 0x -fopenmp -Ofast -shared -lpython3.6m -L / home / andres / boost_1_62_0 / stage / lib / Line 7: LDFLAGS2 = -lboost_python3 -Wl, -rpath, '/ home / andres / boost_1_62_0 / stage / lib /'
Could you help me to configure the file correctly
Greetings and thanks....