Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows unable to install. It keeps asking to install numpy even though its already installed. #306

Open
rohitkrishna094 opened this issue Nov 12, 2023 · 7 comments

Comments

@rohitkrishna094
Copy link

I am using windows 10 and Python 3.12.0 and I created a new folder and ran the below commands as Administrator in a command prompt.

python -m venv venv
venv\Scripts\activate
pip install numpy # success
pip install aeneas # failed

Error

Collecting aeneas
  Using cached aeneas-1.7.3.0.tar.gz (5.5 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [3 lines of output]
      [ERRO] You must install numpy before installing aeneas
      [INFO] Try the following command:
      [INFO] $ sudo pip install numpy
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Why am I getting an error saying that "You must install numpy before installing aeneas"? It makes no sense because according to aeneas documentation itself I ran pip install numpy successfully before running pip install aeneas

@vantoan19
Copy link

I'm facing the same issue

@vantoan19
Copy link

It just failed recently, before that it worked normally

@jzsampaio
Copy link

jzsampaio commented Dec 11, 2023

I think this is related to numpy deprecating distutils, which is used within setup.py for installing aeneas.

Inside setip.py one reads:

try:
    from numpy import get_include
    from numpy.distutils import misc_util
except ImportError:
    print("[ERRO] You must install numpy before installing aeneas")
    print("[INFO] Try the following command:")
    print("[INFO] $ sudo pip install numpy")
    sys.exit(1)

About distutils:

numpy.distutils is deprecated, and will be removed for Python >= 3.12

The issue is not exclusive to Windows. I had the same problem o Ubuntu.

Have you tried downgrade your python version? I was able to install aeneas on python 3.5.10. On python 3.10.1 I cannot pip install aeneas, since I hit the error described on this issue.

However, if I clone the repo, I can execute python -m aeneas.tools.execute_task from the command line (on python 3.10.1). The problem seems to be only on the tooling used for packaging the project.

@Mzaxd
Copy link

Mzaxd commented Dec 27, 2023

same error, i change to python3.10 and fix it

@tkozybski
Copy link

If you still have issues with python version < 3.12, install wheel package before aeneas. That helped for me

@DominikLindorfer
Copy link

DominikLindorfer commented Jul 7, 2024

I've solved this problem changing lines 188 and thereon in setup.py by excluding numpy misc_util as reported in #306 to:

# try importing numpy: if it fails, warn user and exit
try:
    from numpy import get_include
    # from numpy.distutils import misc_util
except ImportError:
    print("[ERRO] You must install numpy before installing aeneas")
    print("[INFO] Try the following command:")
    print("[INFO] $ sudo pip install numpy")
    sys.exit(1)

# to compile cdtw and cmfcc, we need to include the NumPy dirs
INCLUDE_DIRS = [get_include()]

after this I was able to do

python setup.py build_ext --inplace
python aeneas_check_setup.py

and

python setup.py install

to verify and install aeneas.

@sguzman
Copy link

sguzman commented Sep 21, 2024

@DominikLindorfer Thank you so much. This turned out to fix my issue. It feels like progress on this project has stalled. I have been using akki2825's version of this project to get it working on python3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants