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

Issue with Installing multilabel-oversampling #1

Open
naram92 opened this issue Oct 27, 2023 · 4 comments
Open

Issue with Installing multilabel-oversampling #1

naram92 opened this issue Oct 27, 2023 · 4 comments

Comments

@naram92
Copy link

naram92 commented Oct 27, 2023

Hello,

I hope this message finds you well. I recently encountered an issue while trying to install the multilabel-oversampling package directly from the GitHub repository using pip.

Specifically, during the installation process, I received a ModuleNotFoundError indicating that the numpy module was not found. It seems that the package attempts to import numpy during the build/setup phase before numpy is installed, even though numpy is listed as a dependency in install_requires in setup.py.

Here's the error message I received for reference:
File "/private/var/folders/9y/pzqtcdlx1jv2lcr6z_6sq6jm0000gn/T/pip-req-build-ktfxzxk3/multilabel_oversampling/multilabel_oversampling.py", line 1, in
import numpy as np
ModuleNotFoundError: No module named 'numpy'
[end of output]

To resolve the issue, I tried the following:

  • Listed numpy at the beginning of my requirements.txt file to ensure it's installed first.
  • Manually installed numpy and other dependencies before trying to install multilabel-oversampling.
  • Attempted to comment out the numpy imports temporarily to bypass the error.

While I eventually found a workaround, it would be helpful for other users if this issue could be addressed directly in the repository. Perhaps there's a way to ensure that the package doesn't attempt to import dependencies during the build/setup phase or to handle this in a way that doesn't result in an error.

Thank you for your attention to this matter, and I appreciate the work you've put into the multilabel-oversampling package!

Best regards,

@phiyodr
Copy link
Owner

phiyodr commented Apr 15, 2024

Hi, you need to install numpy first.

pip install numpy
pip install git+https://github.com/phiyodr/multilabel-oversampling

@Marco-5724
Copy link

Hi, I have the same issue and I have installed the numpy in my environment as shown in the image below
image
but when I run the following command
pip install git+https://github.com/phiyodr/multilabel-oversampling
it will still report the error shown in the image:

image

If you can help me figure out the cause of this problem, I'd really appreciate it!

@phiyodr
Copy link
Owner

phiyodr commented Apr 16, 2024

Hi,
does this work?

git clone https://github.com/phiyodr/multilabel-oversampling.git
cd multilabel-oversampling
python -m pip install -r requirements.txt 
python -m pip install -e . 

@Marco-5724
Copy link

Hi, does this work?

git clone https://github.com/phiyodr/multilabel-oversampling.git
cd multilabel-oversampling
python -m pip install -r requirements.txt 
python -m pip install -e . 

It can work now! Thank you so much!
image

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

3 participants