Git Product home page Git Product logo

Comments (11)

GrahamDumpleton avatar GrahamDumpleton commented on May 13, 2024

Even fixing those, you get the error:

Collecting sklearn==0.17.1 (from -r requirements.txt (line 4))
  Could not find a version that satisfies the requirement sklearn==0.17.1 (from -r requirements.txt (line 4)) (from versions: 0.0)
No matching distribution found for sklearn==0.17.1 (from -r requirements.txt (line 4))

So wrong package name or version.

from pythondatasciencehandbook.

GrahamDumpleton avatar GrahamDumpleton commented on May 13, 2024

Assuming you probably meant:

scikit-learn==0.17.1

from pythondatasciencehandbook.

GrahamDumpleton avatar GrahamDumpleton commented on May 13, 2024

Missing package:

seaborn

from pythondatasciencehandbook.

GrahamDumpleton avatar GrahamDumpleton commented on May 13, 2024

The sklearn package is actually used, so maybe it was just that version was wrong. Unless scikit-learn also installs its own alias module called sklearn.

from pythondatasciencehandbook.

GrahamDumpleton avatar GrahamDumpleton commented on May 13, 2024

A bit of background as to why pushing for requirements.txt to be accurate.

Systems exist whereby you can reference a Git repository such as this and it will automatically construct a Docker image for you that has all the packages listed in requirements.txt installed. The Docker image is also set up so it will automatically start up Jupyter notebook server with the contents of the repository copied into the image.

This represents an easy way for people to experiment with your notebooks as they can do this using a hosting service which supports such a build mechanism for repositories with notebooks and a requirements.txt file containing listing all the packages they need.

This is a bit different to something like tmpnb.org, which just uses a really fat Jupyter image, which may to may not have all the packages you need. The other systems will install exactly which packages you say you need and what version if pinned. They can also install Python packages which are a part of the repository as well so long as they are reference in the requirements.txt the location of the code in the repository using a relative file system path.

Am happy to demonstrate such a system to you in a hangout if interested.

from pythondatasciencehandbook.

jakevdp avatar jakevdp commented on May 13, 2024

Thanks – this is all in-progress and I will update as I edit and add the notebooks.

from pythondatasciencehandbook.

GrahamDumpleton avatar GrahamDumpleton commented on May 13, 2024

FWIW. I think this is what I ended up with in the end for requirements.txt:

numpy
pandas
scipy
scikit-learn
seaborn
matplotlib
jupyter
notebook
line_profiler
memory_profiler
https://github.com/matplotlib/basemap/archive/master.zip
netCDF4
numexpr
pandas_datareader
Pillow
scikit-image

Dropped pinned versions to try work out lang/locale encoding issue with matplolib.pyplot, but didn't help.

Full list of packages and versions installed was:

backports-abc==0.5                                                                                                                  
backports.shutil-get-terminal-size==1.0.0                                                                                           
basemap==1.0.8                                                                                                                      
certifi==2016.9.26                                                                                                                  
configparser==3.5.0                                                                                                                 
cycler==0.10.0                                                                                                                      
dask==0.12.0                                                                                                                        
decorator==4.0.10                                                                                                                   
entrypoints==0.2.2                                                                                                                  
enum34==1.1.6                                                                                                                       
functools32==3.2.3.post2                                                                                                            
futures==3.0.5                                                                                                                      
ipykernel==4.5.1                                                                                                                    
ipyparallel==5.2.0                                                                                                                  
ipython==5.1.0                                                                                                                      
ipython-genutils==0.1.0                                                                                                             
ipywidgets==5.2.2                                                                                                                   
Jinja2==2.8                                                                                                                         
jsonschema==2.5.1                                                                                                                   
jupyter==1.0.0                                                                                                                      
jupyter-client==4.4.0                                                                                                               
jupyter-console==5.0.0                                                                                                              
jupyter-core==4.2.0                                                                                                                 
line-profiler==2.0                                                                                                                  
MarkupSafe==0.23                                                                                                                    
matplotlib==1.5.3                                                                                                                   
memory-profiler==0.41                                                                                                               
mistune==0.7.3                                                                                                                      
mod-wsgi==4.5.7                                                                                                                     
nbconvert==4.2.0                                                                                                                    
nbformat==4.1.0                                                                                                                     
netCDF4==1.2.4                                                                                                                      
networkx==1.11                                                                                                                      
notebook==4.2.3                                                                                                                     
numexpr==2.6.1                                                                                                                      
numpy==1.11.2                                                                                                                       
pandas==0.19.1                                                                                                                      
pandas-datareader==0.2.1                                                                                                            
pathlib2==2.1.0                                                                                                                     
pexpect==4.2.1                                                                                                                      
pickleshare==0.7.4                                                                                                                  
Pillow==3.4.2                                                                                                                       
prompt-toolkit==1.0.9                                                                                                               
ptyprocess==0.5.1                                                                                                                   
Pygments==2.1.3                                                                                                                     
pyparsing==2.1.10                                                                                                                   
pyproj==1.9.5.1                                                                                                                     
pyshp==1.2.10                                                                                                                       
python-dateutil==2.6.0                                                                                                              
pytz==2016.7                                                                                                                        
pyzmq==16.0.1                                                                                                                       
qtconsole==4.2.1                                                                                                                    
requests==2.12.1                                                                                                                    
requests-file==1.4.1                                                                                                                
scikit-image==0.12.3                                                                                                                
scikit-learn==0.18.1                                                                                                                
scipy==0.18.1                                                                                                                       
seaborn==0.7.1                                                                                                                      
simplegeneric==0.8.1                                                                                                                
singledispatch==3.4.0.3                                                                                                             
six==1.10.0                                                                                                                         
terminado==0.6                                                                                                                      
toolz==0.8.0                                                                                                                        
tornado==4.4.2                                                                                                                      
traitlets==4.3.1                                                                                                                    
wcwidth==0.1.7                                                                                                                      
widgetsnbextension==1.2.6 

This may have a few extras over the minimum required as my base Docker image also installs ipyparallel by default as the image is partly targeted at parallel computing usage and so embedded functionality for creating a distributed cluster of compute engines.

This doesn't do anything about addressing missing helpers_05_08 module.

from pythondatasciencehandbook.

jakevdp avatar jakevdp commented on May 13, 2024

Thanks. I am building the file as I go through the final edits. What's currently there is what's needed for chapters 1-2, and I'll add the rest as I go along.

from pythondatasciencehandbook.

jakevdp avatar jakevdp commented on May 13, 2024

As for the rest - I haven't finished finalizing the repo yet. Please be patient.

from pythondatasciencehandbook.

jakevdp avatar jakevdp commented on May 13, 2024

It would probably make things less confusing if I deleted all the code-only notebooks, but I decided not to do that until all the text is posted.

from pythondatasciencehandbook.

jakevdp avatar jakevdp commented on May 13, 2024

requirements is fixed now.

from pythondatasciencehandbook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.