roadbike

roadbike

Programming Machine Learning: Setting up your system (p 13)

From page 13:
On Python 3.7, you can install the libraries with pip by running these commands inside a Python venv using Visual Studio Code

pip3 install numpy==1.19.5
pip3 install matplotlib==3.2.2
pip3 install seaborn==0.11.1

With Windows 11 I faced these errors when trying to install Numpy 1.19.5.

  1. Microsoft Visual C++ 14.0 was required. After installing C++ I retried installing numpy to run into…
  2. “TypeError: CCompiler_spawn() got an unexpected keyword argument ‘env’”. I updated the setuptools but that did not help because I got the same error. So I tried Numpy using pip install numpy==1.19.5 --no-binary=:all: --no-build but I got
  3. the error Running cythonize failed so I installed Cython but that did not help because I got the same error after retrying to install numpy

I gave up troubleshooting and decided to install the latest versions of the packages and see what happens when I try to run the code in the book.

Should I try another route? Any suggestions for installing the packages in a Windows 11 environment? Should I expect to run into any issues later in the book because I don’t have the specific version for the packages?

Regards,
roadbike

Marked As Solved

nusco

nusco

Author of Metaprogramming Ruby & Programming Machine Learning

Hello there! I’m sorry that it’s so hard to set up a reproducible Python ML system on Windows (or anywhere else for that matter). I can only tell you that I did my darnedest to provide repeatable instructions, but anything that I wrote tended to become obsolete, and often broken, within a couple of weeks. Now that the book is a few years old, all bets are off.

First of all, did you check the Setup page on the book’s site? The instructions there aren’t guaranteed to work anymore either, but at least I could keep it updated for as long as I managed. Recently, the distance between the versions of the libraries that I used in the books and the versions that you can install on all platforms got wider. I realized that I should just come up with an updated version of the book, with updated code for all examples.

Even if the instructions on the Setup page fail for you, however, you can still install the latest libraries and read the book. To answer your question:

Should I expect to run into any issues later in the book because
I don’t have the specific version for the packages?

Yes, but probably not major ones. Usually, if you install the latest packages, you only need a few tweaks to the code to make it run fine. Most of the issues can be fixed by looking at the “Troubleshooting” section of the setup page. If you find other errors that are not listed there, I’d appreciate it if you let me know.

Popular Prag Prog topics Top

jamis
The following is cross-posted from the original Ray Tracer Challenge forum, from a post by garfieldnate. I’m cross-posting it so that the...
New
Alexandr
Hi everyone! There is an error on the page 71 in the book “Programming machine learning from coding to depp learning” P. Perrotta. You c...
New
Mmm
Hi, build fails on: bracket-lib = “~0.8.1” when running on Mac Mini M1 Rust version 1.5.0: Compiling winit v0.22.2 error[E0308]: mi...
New
swlaschin
The book has the same “Problem space/Solution space” diagram on page 18 as is on page 17. The correct Problem/Solution space diagrams ar...
New
adamwoolhether
I’m not quite sure what’s going on here, but I’m unable to have to containers successfully complete the Readiness/Liveness checks. I’m im...
New
jskubick
I found an issue in Chapter 7 regarding android:backgroundTint vs app:backgroundTint. How to replicate: load chapter-7 from zipfile i...
New
hazardco
On page 78 the following code appears: <%= link_to ‘Destroy’, product, class: ‘hover:underline’, method: :delete, data: { confirm...
New
creminology
Skimming ahead, much of the following is explained in Chapter 3, but new readers (like me!) will hit a roadblock in Chapter 2 with their ...
New
s2k
Hi all, currently I wonder how the Tailwind colours work (or don’t work). For example, in app/views/layouts/application.html.erb I have...
New
dachristenson
I just bought this book to learn about Android development, and I’m already running into a major issue in Ch. 1, p. 20: “Update activity...
New

Other popular topics Top

Devtalk
Reading something? Working on something? Planning something? Changing jobs even!? If you’re up for sharing, please let us know what you’...
1017 16885 373
New
AstonJ
Or looking forward to? :nerd_face:
New
AstonJ
SpaceVim seems to be gaining in features and popularity and I just wondered how it compares with SpaceMacs in 2020 - anyone have any thou...
New
PragmaticBookshelf
Rust is an exciting new programming language combining the power of C with memory safety, fearless concurrency, and productivity boosters...
New
Exadra37
I am a Linux user since 2012, more or less, and I always use Ubuntu on my computers, and my last 2 laptops have been used Thinkpads, wher...
New
PragmaticBookshelf
Learn different ways of writing concurrent code in Elixir and increase your application's performance, without sacrificing scalability or...
New
DevotionGeo
The V Programming Language Simple language for building maintainable programs V is already mentioned couple of times in the forum, but I...
New
gagan7995
API 4 Path: /user/following/ Method: GET Description: Returns the list of all names of people whom the user follows Response [ { ...
New
PragmaticBookshelf
Author Spotlight: VM Brasseur @vmbrasseur We have a treat for you today! We turn the spotlight onto Open Source as we sit down with V...
New
DevotionGeo
I have always used antique keyboards like Cherry MX 1800 or Cherry MX 8100 and almost always have modified the switches in some way, like...
New

Latest in PragProg

View all threads ❯