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

Installing this repository with pip #32

Open
NilsHulzebosch opened this issue Nov 17, 2021 · 2 comments
Open

Installing this repository with pip #32

NilsHulzebosch opened this issue Nov 17, 2021 · 2 comments

Comments

@NilsHulzebosch
Copy link

Hi there, when installing this repository with pip install -r requirements.txt (where the requirements.txt file contains git+https://github.com/KaiyangZhou/Dassl.pytorch.git), the import numpy as np in setup.py throws a ModuleNotFoundError, because numpy is not yet installed at that moment. Is is it possible to remove the import numpy as np statement and def numpy_include(): ... from setup.py such that this repository can be installed automatically with pip?

@KaiyangZhou
Copy link
Owner

When you run conda create -n dassl python=3.7, the numpy package is supposed to be installed. No?

@NilsHulzebosch
Copy link
Author

Correct indeed if you follow the instructions provided under Get started / Installation.

However, in our project we use pip as an alternative way of installing this repository (without conda). This would succeed if import numpy and def numpy_include(): ... are removed (the latter is declared but never called in the repository). Since numpy is a third-party library, it might be more robust to remove from setup.py or put it in a try ... except ... clause.

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

2 participants