Skip to content

Distutils readme upd #955

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,32 @@ GPU accelerated Neural networks in JavaScript for Browsers and Node.js

## Installation and Usage

### NPM
> [!CAUTION]
> Before installing brain.js, make sure `setuptools` is installed with administrative privileges.
> Since **Python 3.12**, the `distutils` module has been removed from the standard library. Many tools that previously depended on `distutils` now rely on `setuptools`.
> To avoid installation errors, open PowerShell as Administrator and run:
> ```ps
> pip install setuptools
>```
> [Reference: GitHub Issue Comment](https://github.com/BrainJS/brain.js/issues/930#issuecomment-2155350536)\
> [Reference: Python Standard Library: distutils](https://docs.python.org/3/library/distutils.html)

> [!NOTE]
> Some users may encounter issues due to an outdated `node-gyp` version (< 10), which leads to similar errors related to the missing `distutils` module.
> To fix this, you can use the overrides field in your `package.json` file to force compatible versions of sub-dependencies:
> ```json
> "overrides": {
> "brain.js": {
> "gpu.js": {
> "gl": "^8.1.6"
> }
> },
> "node-gyp": "^10.2.0"
>}
>```
> [Reference: GitHub Issue Comment](https://github.com/BrainJS/brain.js/issues/930#issuecomment-2818251889)

### NPM
If you can install `brain.js` with [npm](http://npmjs.org):

```bash
Expand Down