Skip to content
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

Add Python 3 support #102

Open
themartorana opened this issue Jul 2, 2018 · 7 comments
Open

Add Python 3 support #102

themartorana opened this issue Jul 2, 2018 · 7 comments

Comments

@themartorana
Copy link

This is the only thing left on our systems requiring Python 2. If I have time I'll run a 2to3 pass across it and see what happens.

Thanks!

@till
Copy link
Contributor

till commented Apr 27, 2019

It would be nice if in the meantime, someone added this to the docs that it's not 2.4+ but any Python 2 version. :)

@echee2
Copy link
Contributor

echee2 commented May 9, 2019

Thanks. We'll update the docs. Also we will have a Python 3 version before Python 2 end of life.

@sureshvmw
Copy link

sureshvmw commented Jan 10, 2020

Hi Team,

Is there any update / luck ?
We were trying to migrate from python2 to python3 and made python 3.6.9 as default and tried to run scalyr-agent.. But it failed due to the compatibility issue (python-2). Is there any fix/workaround to run it with python3 ?

@echee2 - Pls find the error below:

user@ipaddress$ sudo systemctl status scalyr-agent-2
● scalyr-agent-2.service - LSB: Manages the Scalyr Agent 2, which provides log copying
Loaded: loaded (/etc/init.d/scalyr-agent-2; generated)
Active: failed (Result: exit-code) since Fri 2020-01-10 12:54:03 UTC; 5min ago
Docs: man:systemd-sysv-generator(8)
Process: 11762 ExecStart=/etc/init.d/scalyr-agent-2 start (code=exited, status=1/FAILURE)

Jan 10 12:54:03 xxxxyyyy systemd[1]: Starting LSB: Manages the Scalyr Agent 2, which provides log copying...
Jan 10 12:54:03 xxxxyyyy scalyr-agent-2[11762]: File "/etc/init.d/scalyr-agent-2", line 207
Jan 10 12:54:03 xxxxyyyy scalyr-agent-2[11762]: print 'The Scalyr Agent 2 version is %s' % SCALYR_VERSION
Jan 10 12:54:03 xxxxyyyy scalyr-agent-2[11762]: ^
Jan 10 12:54:03 xxxxyyyy[11762]: SyntaxError: Missing parentheses in call to 'print'. Did you mean print('The Scalyr Agent 2 version is %s' % SCALYR_VERSION)?
Jan 10 12:54:03 xxxxyyyy systemd[1]: scalyr-agent-2.service: Control process exited, code=exited status=1
Jan 10 12:54:03 xxxxyyyy systemd[1]: scalyr-agent-2.service: Failed with result 'exit-code'.
Jan 10 12:54:03 xxxxyyyy systemd[1]: Failed to start LSB: Manages the Scalyr Agent 2, which provides log copying.

@sureshvmw
Copy link

This is the only thing left on our systems requiring Python 2. If I have time I'll run a 2to3 pass across it and see what happens.

Thanks!

hey, any luck with 2to3 ?.. I tried didn't work

@themartorana
Copy link
Author

I'd like to bump this. Python 2 is disappearing from OS package managers. Thanks.

@garthk
Copy link

garthk commented Mar 11, 2021

Pip is getting louder, too:

DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020.
Please upgrade your Python as Python 2.7 is no longer maintained.
pip 21.0 will drop support for Python 2.7 in January 2021.
More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
pip 21.0 will remove support for this functionality.

@ajtcode
Copy link

ajtcode commented Mar 11, 2021

Hi all!

Apologies for the lack of updates to this issue -- The Scalyr Agent has supported Python 3 (>= 3.5) since its v2.1.1 release on March 30, 2020. If you are presently running a v2.1.x release, you can switch the version of by executing the scalyr-switch-python command. For example,

$ sudo scalyr-switch-python python3
Switched agent to python3
If you have an existing instance of scalyr-agent-2 process running, you need to restart it for this change to take an affect.
You can do that by running '/etc/init.d/scalyr-agent-2 restart' command.
Agent switched to python3.

Hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants