Git Product home page Git Product logo

Comments (11)

jkfurtney avatar jkfurtney commented on June 22, 2024

What FMM based app are you trying to build?

scikit-fmm builds on TravisCI in my experience. When I last looked into it you had to do some stuff to get numpy installed onto the TravisCI build VMs. see: https://github.com/scikit-fmm/scikit-fmm/blob/master/.travis.yml

Hope that helps.

from scikit-fmm.

jkfurtney avatar jkfurtney commented on June 22, 2024

I am going to close this issue because it seems this is not an issue with scikit-fmm. Reopen if there is still a problem.

from scikit-fmm.

ManifoldFR avatar ManifoldFR commented on June 22, 2024

It's a Gradle-based because part of it uses Java and Kotlin. My .travis.yml is

language: java

jdk:
- oraclejdk8
python: '3.6'

cache:
  directories:
  - .gradle

install:
- pyenv shell 3.6
- pip3 install --user -r requirements.txt

script:
- whoami
- gradle build -q

so I actually only use pip in the VM.

The full requirements.txt is

numpy>=1.14
numba>=0.35
requests>=2.14
scikit-fmm==0.0.9
websockets==4.0.1
pillow==5.0.0
matplotlib==2.1.0

from scikit-fmm.

ManifoldFR avatar ManifoldFR commented on June 22, 2024

I just tried building in a locally created virtual environment (again, pip only) on my machine. I get the same traceback when it tried to build scikit-fmm.

I'm looking at a way this can be fixed

from scikit-fmm.

olegsinavski avatar olegsinavski commented on June 22, 2024

The issue still persists. You can clearly see the bug in setup.py from numpy.distutils.core import setup. The import will fail during running setup.py (!) which is needed to determine what to install. pip would not know that numpy is required because it would fail on parsing setup.py. The solution seem to be specifying build dependencies (see discussion here)

from scikit-fmm.

jkfurtney avatar jkfurtney commented on June 22, 2024

Thanks for the message. I thought this was fixed by @ManifoldFR in 3053a97 but I guess not? I will reopen the issue. Can you give more context of how the problem is occurring? (Python version, scikit-fmm version, os, commands, specific error messages, etc.) It would be great if you could make a PR that addresses the problem.

from scikit-fmm.

olegsinavski avatar olegsinavski commented on June 22, 2024

@jkfurtney sure!
python2.7 (pip 19.2.1) or 3.6 (pip 8.1.1)
You can see the error, but I'm confused now - it seems that at the end installation was successful and I can import it. I'm trying to reproduce the case when it failed for good but I already went through multiple pip versions and I don't remember which one I used before

virtualenv venv 
source venv/bin/activate
printf "numpy==1.16.0\nscikit-fmm==2019.1.30\n" > requirements.txt
pip install -r requirements.txt

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting numpy==1.16.0 (from -r requirements.txt (line 1))
  Downloading https://files.pythonhosted.org/packages/9f/85/163127d3fb0573deb9eca947cfc73aa3618eaaf8656501460574471d114a/numpy-1.16.0-cp27-cp27mu-manylinux1_x86_64.whl (17.0MB)
     |████████████████████████████████| 17.0MB 13.0MB/s 
Collecting scikit-fmm==2019.1.30 (from -r requirements.txt (line 2))
  Downloading https://files.pythonhosted.org/packages/9a/a5/2bacbdbbde95598fdc36ded7968a2e590f51fcfcd81a68e5c783db131d80/scikit-fmm-2019.1.30.tar.gz (418kB)
     |████████████████████████████████| 419kB 25.5MB/s 
Building wheels for collected packages: scikit-fmm
  Building wheel for scikit-fmm (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/sinyavskiy/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-xjZvl8/scikit-fmm/setup.py'"'"'; __file__='"'"'/tmp/pip-install-xjZvl8/scikit-fmm/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-eIL7fF --python-tag cp27
       cwd: /tmp/pip-install-xjZvl8/scikit-fmm/
  Complete output (7 lines):
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-xjZvl8/scikit-fmm/setup.py", line 121, in <module>
      setup_package()
    File "/tmp/pip-install-xjZvl8/scikit-fmm/setup.py", line 115, in setup_package
      from numpy.distutils.core import setup
  ImportError: No module named numpy.distutils.core
  ----------------------------------------
  ERROR: Failed building wheel for scikit-fmm
  Running setup.py clean for scikit-fmm
Failed to build scikit-fmm
Installing collected packages: numpy, scikit-fmm
  Running setup.py install for scikit-fmm ... done
Successfully installed numpy-1.16.0 scikit-fmm-2019.1.30

Even if it succeeds in the end, I think error message should not be there anyway

from scikit-fmm.

ManifoldFR avatar ManifoldFR commented on June 22, 2024

Isn't numpy.distutils.core installed along with NumPy?

from scikit-fmm.

olegsinavski avatar olegsinavski commented on June 22, 2024

Isn't numpy.distutils.core installed along with NumPy?

yes, I think its included into a standard numpy packaging

from scikit-fmm.

jkfurtney avatar jkfurtney commented on June 22, 2024

Is this still a problem? I will close this for now.

from scikit-fmm.

davidparsson avatar davidparsson commented on June 22, 2024

@jkfurtney, unfortunately I'm still seeing this with version 2019.1.30 of scikit-fmm. It tries to build the wheel before numpy is installed.

I'm on Python 3.7.9 and pip 20.3.1 on MacOS 11, and for me this can be reproduced easily on a fresh Python installation/virtualenv:

$ pip install wheel
$ pip install scikit-fmm==2019.1.30 numpy==1.15.0

This will give the above error (seen in #23 (comment)). The installation will then continue successfully, but with this deprecation warning:

DEPRECATION: scikit-fmm was installed using the legacy 'setup.py install' method, because a wheel could not be built for it. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at pypa/pip#8368.

from scikit-fmm.

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.