how do I install the linear_algebra library?
See original GitHub issueI’ve got your book. I’m working/skimming through it. I’ve hit a brick wall.
in your Readme.md you have the following snippet
from linear_algebra import distance, vector_mean
v = [1, 2, 3]
w = [4, 5, 6]
print distance(v, w)
print vector_mean([v, w])
This throws the following error:
ImportError: No module named linear_algebra
Where is the linear_algebra library from? I’ve got a feeling it should have something to do with numpy
For info I’m running python 2.7 using the anaconda stack
Issue Analytics
- State:
- Created 8 years ago
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Installation - OptimLib documentation - Read the Docs
OptimLib requires either the Armadillo or Eigen(3) C++ linear algebra libraries. (Note that Eigen version 3.4.0 requires a C++14-compatible compiler.).
Read more >LAPACK — Linear Algebra PACKage - The Netlib
LAPACK is written in Fortran 90 and provides routines for solving systems of simultaneous linear equations, least-squares solutions of linear systems of ...
Read more >LinearAlgebra - PyPI
1. pip install LinearAlgebra. Copy PIP instructions. Latest version. Released: Aug 6, 2015.
Read more >linear-algebra - npm
Efficient, high-performance linear algebra library. ... Start using linear-algebra in your project by running `npm i linear-algebra`.
Read more >Linear Algebra library by Winsoft - Blogs Embarcadero
Linear Algebra library supports Windows 32 and Windows 64. ... Package) libraries. Installation instructions can be seen in the video below.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
So the short answer is that it’s not really set up as a library that’s “installed”, it’s just a bunch of files that you can import, but you have to already be in their directory:
i.e. if you download the whole repo to c:\data-science-from-scratch, then in IPython you’d do
In [1]: cd c:/data-science-from-scratch/code
In [2]: from linear_algebra import vector_add
Let me know if you still can’t get it to work.
you need the file
linear_algebra.pycontaining the code from the “Linear Algebra” chapter.if you download the code from this repo you’ll have it (and all the similar files)