Skip to content

One trick to help install this package on some small machines such as windows or WSL #634

@linphone-young

Description

@linphone-young

Problem Identification:
If the system crashes during the python setup.py install process, it is likely due to a memory overload. To confirm, monitor the system’s memory usage in a separate terminal with the following command:

watch -n 1 free -h
If you observe a rapid and sustained spike in memory consumption (boom-up) leading to a system freeze or crash, the issue is likely caused by parallel compilation using too many threads.

Solution:
Limit the number of parallel compilation threads to reduce memory pressure. This can be done by modifying the setup.py file:

Open setup.py in a text editor.
Locate line 145, which defines MAX_COMPILATION_THREADS=12.
Reduce this value to a smaller number. For a minimal resource footprint, set it to 1:

# Before
MAX_COMPILATION_THREADS=12

# After
MAX_COMPILATION_THREADS=1

Save the file and re-run the installation:

python setup.py install

Others:
If you encounter this situation when using "pip install", please download the compressed file and install it by modifying the "setup.py" file as described above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions