Giter Club home page Giter Club logo

Comments (9)

tommyod avatar tommyod commented on June 3, 2024

I've been developing for Python 3.6.

I will look into whether it can be easily backported to Python 2.7.

What is your operating system @devesh1508 ?

from kdepy.

devesh1508 avatar devesh1508 commented on June 3, 2024

The OS is Ubuntu 16.04. With python 3.6 (in a virtual env),
I get the following error
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
-Command "/homes/jha/KDE/bin/python3.6 -u -c "import setuptools, tokenize;file='/tmp/pip-install-tpyimiri/KDEpy/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-rge7raxi/install-record.txt --single-version-externally-managed --compile --install-headers /homes/jha/KDE/include/site/python3.6/KDEpy" failed with error code 1 in /tmp/pip-install-tpyimiri/KDEpy/

from kdepy.

tommyod avatar tommyod commented on June 3, 2024

Thank you for reporting this. This is the first time I've tried to distribute with Cython as a requirement. I've found some errors which I will fix. In the meantime, installing some dependencies before KDEpy works on my computer (Ubuntu 16.04 using Anaconda).

Create a fresh environment, then install dependencies before KDEpy.

$ conda create -n kde python=3.6
$ source activate kde
$ conda install numpy scipy cython
$ pip install KDEpy

Now everything seems to work.

$ python
>>> import numpy as np
>>> from KDEpy import FFTKDE
>>> x, y = FFTKDE().fit(np.random.randn(10**5)).evaluate()
>>> exit()
$ source deactivate 

Can you try installing numpy scipy cython before KDEpy?

from kdepy.

tommyod avatar tommyod commented on June 3, 2024

Update: Managed to ship a compiled .c file. The following now works for me.

I create an environment called kde with numpy installed, install KDEpy, test that it works, deactivate and delete the environment.

$ conda create -n kde python=3.6 numpy
$ conda activate kde
$ pip install KDEpy --no-cache-dir
$ python
>>> from KDEpy import FFTKDE
>>> x, y = FFTKDE().fit([1, 2, 3]).evaluate()
>>> exit()
$ conda deactivate
$ conda env remove -n kde

Can you give it a shot? Thanks.

from kdepy.

devesh1508 avatar devesh1508 commented on June 3, 2024

Thanks for both the suggestions. One question before I try them-- Do I need anaconda? I use default python. Would it work without anaconda?

from kdepy.

tommyod avatar tommyod commented on June 3, 2024

In principle you should not need anaconda. However, it's a great tool because it lets you install multiple Python environments in parallel -- that's how I'm able to create a "throwaway" environment for testing this particular problem. I would recommend Anaconda.

You're free to try without too of course(let me know how it goes!). I've been working on installation issues all day. I've managed to get it working on my Ubuntu machines, and on Windows too. Still more work to do before it's perfect. I didn't anticipate it being this difficult, so thanks for the patience!

from kdepy.

tommyod avatar tommyod commented on June 3, 2024

@devesh1508 Did you figure it out?

I've compiled wheels for Linux now. So you should be able to pip install KDEpy without needing to build Cython. 👍

from kdepy.

devesh1508 avatar devesh1508 commented on June 3, 2024

@tommyod Sorry for a late reply. I did pip install KDEpy with python 3.6 and it works now. Thanks for all your help

from kdepy.

tommyod avatar tommyod commented on June 3, 2024

Great to hear! Thanks for reporting, and for the patience.

from kdepy.

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.