WRN Install python-prctl so that processes can be cleaned with guarantee

Viewed 540

I am getting this Warning "WRN Install python-prctl so that processes can be cleaned with guarantee." though I have installed 'python-prctl' from this site. But still getting this warning, I am using tensorpack to load data quickly by using data_generator.enter image description here

I am using python3, I have attached the image above of that warning.

I don't know why I am getting this error? Actually I am using tensorpack specially for this data generator cause it has some special features to load data quickly.

1 Answers

Oh, a three year old question. I assume you've already solved it, but I'll tell how I did it.

This warning means the package was not found, and it is generated by this function: enable_death_signal(_warn=True)

https://tensorpack.readthedocs.io/en/latest/_modules/tensorpack/utils/concurrency.html

I need to use Python 3.7 for my work, so I installed:

sudo apt-get install python3.7-dev libcap-dev python3-setuptools

If you use a different version of Python, just change python3.7-dev for python3.9-dev, python3-dev, for instance.

Then, follow the instructions of the official site:

Now, you need to find where the packages are installed. For me, they are in

/usr/local/lib/python3.7/dist-packages/python_prctl-1.8.1-py3.7-linux-x86_64.egg/

This directory must contain:

  • _prctl.cpython-37m-x86_64-linux-gnu.so
  • _prctl.py
  • prctl.py

Now, open a terminal in this directory and test: python3.7 -c "import prctl; print(prctl)"

If no problems are found, go to any another directory and test it again. If it fails, test:

python3.7 -c "import sys; sys.path.append('/usr/local/lib/python3.7/dist-packages/python_prctl-1.8.1-py3.7-linux-x86_64.egg/'); import prctl; print(prctl); print(sys.version_info)"

It must print:

<module 'prctl' from '/usr/local/lib/python3.7/dist-packages/python_prctl-1.8.1-py3.7-linux-x86_64.egg/prctl.py'>
sys.version_info(major=3, minor=7, micro=10, releaselevel='final', serial=0)

If this works, you need to add this in your code that imports prctl:

import sys
sys.path.append('/usr/local/lib/python3.7/dist-packages/python_prctl-1.8.1-py3.7-linux-x86_64.egg/')
Related