如何增加基于Java的Python库的堆空间?

huangapple go评论52阅读模式
英文:

How to increase heap space for a Python library based on Java?

问题

我是一个Python用户,正在使用一个基于Java的库(lolopy,https://pypi.org/project/lolopy/)时遇到问题。具体来说,我应该根据文档中作者的建议增加堆内存空间:

"通过设置LOLOPY_JVM_MEMORY环境变量可以实现设置运行机器学习计算的JVM的最大内存占用。LOLOPY_JVM_MEMORY的值用于设置JVM的最大堆大小(详见Oracle的文档)。例如,“4g”允许lolo使用4GB内存。"

由于我从未使用过Java,我不知道该怎么做。提前感谢。

英文:

I'm a Python user and I'm struggling with a java-based library (lolopy, https://pypi.org/project/lolopy/). In particular, I should increase the heap space following what the authors say in the documentation:

"Setting the maximum memory footprint for the JVM running the machine learning calculations can be achieved by setting the LOLOPY_JVM_MEMORY environment variable. The value for LOLOPY_JVM_MEMORY is used to set the maximum heap size for the JVM (see Oracle’s documentation for details). For example, “4g” allows lolo to use 4GB of memory".

Having never used Java, I have no idea what to do. Thanks in advance.

答案1

得分: 2

只需添加一个新的环境变量:

名称: LOLOPY_JVM_MEMORY

值: 4g(或您需要的任何其他值)

如果您不知道如何操作,以下是一个简单的手动操作说明。只需将 PATH 更改为 LOLOPY_JVM_MEMORY:https://www.java.com/en/download/help/path.xml

但这与Java无关,只是一个简单的环境变量

[编辑]

好的,这个教程更好:https://www.poftut.com/how-to-set-environment-variables-for-linux-windows-bsd-and-macosx/

英文:

Just add a new env variable:

> Name: LOLOPY_JVM_MEMORY
>
> Value: 4g (or any other value you need)

Here is simple manual how to do it if you don't know. Just change PATH to LOLOPY_JVM_MEMORY: https://www.java.com/en/download/help/path.xml

But it has nothing with Java. It just a simple environment variable

[EDIT]

Ok, this tutorial is much better: https://www.poftut.com/how-to-set-environment-variables-for-linux-windows-bsd-and-macosx/

huangapple
  • 本文由 发表于 2020年7月22日 23:05:08
  • 转载请务必保留本文链接:https://go.coder-hub.com/63037400.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定