GithubHelp home page GithubHelp logo

Comments (1)

juanma-rm avatar juanma-rm commented on June 14, 2024

Hi emmanuel. I hope this answer is not too late for you and can somehow help you.

The issue arises since scratch is expected to be a module available but cannot be found by the python interpreter. scratch module corresponds to "scratch" folder provided with this repository, and linear_algebra.py is located.

Note: In my case I am not using anaconda but my own virtual environment.

I have this folder structure:
my_workspace
|_ my_venv
|_ scratch (containing all .py files, including linear_algebra.py and init.py, which are relevant here)

I run the following lines from my terminal (I am on Windows, but should work for Linux/MacOS too) in order to make the script work:
cd my_workspace
my_venv\Scripts\activate
set PYTHONPATH=./scratch # For windows
export PYTHONPATH=./scratch # For mac/linux
python3 scratch\ch8_2.py # It should work now

from data-science-from-scratch.

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.