Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"No module named numpy" error when installing from requirements.txt

Tags:

python

pip

numpy

I am trying to install list of packages from requirements.txt. However, even though I have numpy listed in the file, package tulipy is returning error ImportError: No module named 'numpy'. Please note, I still want to install the packages with one command, from file. Are there any workarounds for it?

My requirements.txt:

numpy>=1.14.1
Cython>=0.28.2
ccxt>=1.13.50
tulipy>=0.2.1
like image 922
kb4145 Avatar asked Oct 21 '25 11:10

kb4145


1 Answers

Updated answer

numpy and Cython have to be installed prior to tulipy. To do this, you can install the packages in requirements.txt individually and in order. numpy and Cython must be above tulipy in the requirements file.

xargs -n1 pip install < requirements.txt

[taken from a previous stackoverflow answer]

Old answer

tulipy requires numpy to be installed. To work around this, first install numpy, and then install your requirements.txt file.

pip install numpy
pip install -r requirements.txt

As proof that tulipy requires numpy during installation, please take a look at tulipy's setup.py file.

like image 119
jakub Avatar answered Oct 24 '25 00:10

jakub



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!