Giter Site home page Giter Site logo

Comments (7)

GillesVandewiele avatar GillesVandewiele commented on August 24, 2024

Hi,

The requirements.txt was generated with version numbers that were the latest at that time. I think most of these dependencies are backward compatible and you could just install the latest version and the code should still work. If not, you can post any issues here and we can look into it

from gendis.

aendrs avatar aendrs commented on August 24, 2024

Hi Gilles, thanks for your answer.
I have been doing some experiments with diverse anaconda environments in order to find the best way to install it. It seems that installing it in a fresh environment following the suggested way (cloning the reporitory and doing pip install -r requirements.txt) causes some packages to be forcefully frozen in the required versions, something which prevents the installation of new packages, updated versions, or other software such as Spyder (it always finds requirement problems )

Something interesting that happened when I tried to install it in other ways is that the function gendis.GeneticExtractor no longer accepts the argument location, and the results of a basic task are worse than when it is installed in the suggested way (and setting location=True of course). So I think that's not the best installation alternative.

Is there a way to install it in the original way but not have the package versions as hard requirements? Or what do you suggest?
Thanks again, cheers.

from gendis.

GillesVandewiele avatar GillesVandewiele commented on August 24, 2024

Hi @aendrs

It could indeed be that the version deployed to PyPi (which is the one you'd obtain when running pip install gendis) does not yet contain the location keyword. What I'd suggest is the following:

  1. Install latest versions of our dependencies (numpy, scikit-learn, deap, pandas are the most significant).
  2. Clone the repo
  3. Run python setup.py develop --no-deps

This should add the gendis repo to your dist-packages such that you can import it from anywhere in your environment. The import statements in the gendis code itself will then make use of the latest versions of these dependencies.

from gendis.

aendrs avatar aendrs commented on August 24, 2024

Hi Gilles, thanks for the suggestion. I will try to create a new environment and set it up as you suggest, it seems to be what I need to avoid internal conflicts.

from gendis.

GillesVandewiele avatar GillesVandewiele commented on August 24, 2024

Feel free to do a pip freeze of your environment once you set it up correctly, such that I can update requirements.txt accordingly (I do not use virtual environments so rather hard to make a good update).

from gendis.

aendrs avatar aendrs commented on August 24, 2024

Hi Gilles, after some months doing other projects and using a previously installed Gendis version in an isolated environment I decided to properly install it in a new environment. I did what you suggest, cloning the environment and installing it with : python setup.py develop --no-deps, however I ended up with the same problem of not having the option location in GeneticExtractor

genetic_extractor = GeneticExtractor(verbose=True, population_size=50, iterations=100, plot=None,location=True)
Traceback (most recent call last):

  Input In [12] in <cell line: 1>
    genetic_extractor = GeneticExtractor(verbose=True, population_size=50, iterations=100, plot=None,location=True)

TypeError: __init__() got an unexpected keyword argument 'location'

What do you suggest?
by the way, this is the output of the installation command:


amendez@onuava:~/Documents/clonedrepos/GENDIS$ python setup.py develop --no-deps
running develop
/usr/local/anaconda3/envs/gendis2/lib/python3.8/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/usr/local/anaconda3/envs/gendis2/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
running egg_info
creating GENDIS.egg-info
writing GENDIS.egg-info/PKG-INFO
writing dependency_links to GENDIS.egg-info/dependency_links.txt
writing requirements to GENDIS.egg-info/requires.txt
writing top-level names to GENDIS.egg-info/top_level.txt
writing manifest file 'GENDIS.egg-info/SOURCES.txt'
reading manifest file 'GENDIS.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'GENDIS.egg-info/SOURCES.txt'
running build_ext
building 'gendis.pairwise_dist' extension
creating build
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/gendis
gcc -pthread -B /usr/local/anaconda3/envs/gendis2/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/anaconda3/envs/gendis2/lib/python3.8/site-packages/numpy/core/include -I/usr/local/anaconda3/envs/gendis2/include/python3.8 -I/usr/local/anaconda3/envs/gendis2/include/python3.8 -c gendis/pairwise_dist.c -o build/temp.linux-x86_64-3.8/gendis/pairwise_dist.o
In file included from /usr/local/anaconda3/envs/gendis2/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1969,
                 from /usr/local/anaconda3/envs/gendis2/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                 from /usr/local/anaconda3/envs/gendis2/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from gendis/pairwise_dist.c:611:
/usr/local/anaconda3/envs/gendis2/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   17 | #warning "Using deprecated NumPy API, disable it with " \
      |  ^~~~~~~
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/gendis
gcc -pthread -shared -B /usr/local/anaconda3/envs/gendis2/compiler_compat -L/usr/local/anaconda3/envs/gendis2/lib -Wl,-rpath=/usr/local/anaconda3/envs/gendis2/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.8/gendis/pairwise_dist.o -o build/lib.linux-x86_64-3.8/gendis/pairwise_dist.cpython-38-x86_64-linux-gnu.so
copying build/lib.linux-x86_64-3.8/gendis/pairwise_dist.cpython-38-x86_64-linux-gnu.so -> gendis
Creating /usr/local/anaconda3/envs/gendis2/lib/python3.8/site-packages/GENDIS.egg-link (link to .)
Adding GENDIS 1.0.13 to easy-install.pth file

Installed /home/amendez/Documents/clonedrepos/GENDIS

from gendis.

GillesVandewiele avatar GillesVandewiele commented on August 24, 2024

Strange indeed 🤔. If you are in a virtual environment, you can probably run python setup.py install --no-deps instead. Also perhaps run pip uninstall gendis as it might be conflicting with a globally installed package. If nothing else works, you could try manually adding the path to gendis to your system path (sys.path.append("PATH_TO_GENDIS"))

from gendis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.