course-starter-python icon indicating copy to clipboard operation
course-starter-python copied to clipboard

Install a package

Open AIITech opened this issue 5 years ago • 3 comments

Hi,

Thank you for this creative platform. It is amazing. I just want to ask how to install a python library. I am trying to import numpy library but I got this error ( No module named 'numpy' ). I tried to solve this problem by adding ( numpy==1.16.5 ) to ( binder/requirements.txt ) but I still get the same error. Could you tell me please how to add python packages to ( course-starter-python )?

Thanks in advance.

AIITech avatar Sep 23 '19 10:09 AIITech

I tried to solve this problem by adding ( numpy==1.16.5 ) to ( binder/requirements.txt ) but I still get the same error.

Yes, this should work. Make sure you actually add that change to the binder branch and then rebuild the Binder: https://github.com/ines/course-starter-python#setting-up-binder

ines avatar Sep 24 '19 08:09 ines

Hi Ines,

I absolutely love this framework and all your work! I am having a similar problem where I have built my binder branch making sure to add

pandas==0.25.3
numpy>=1.11.0,<1.16.4 
scikit-learn==0.21.2

in the requirements.txt document. I have rebuilt everything and it appears that the modules are installed when reading the binder log but I'm still getting the error No module named 'pandas' running an exercise when I run the app on localhost:8000.

Do you have any ideas or troubleshooting suggestions?

hfboyce avatar Jan 14 '20 20:01 hfboyce

This was resolved by not being silly and making a binder of the proper branch 🤦🏼‍♀️ When building the binder, it's important to specify the branch binder which I failed to do. WHOOPS!

hfboyce avatar Jan 17 '20 21:01 hfboyce