can access object with linode-cli obj la

Im using an M1 MAC that for some reason has python 2.7 as its default and Boto3 packages linked. I also have python 3.10 installed.
So I get this error:

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/bin/linode-cli", line 8, in <module>
sys.exit(main())
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/linodecli/init__.py", line 221, in main plugins.invoke(parsed.command, plugin_args, context) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/linodecli/plugins/_init_.py", line 67, in invoke plugin = import_module("linodecli.plugins." + name) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/_init_.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap="">", line 1050, in _gcd_import File "<frozen importlib._bootstrap="">", line 1027, in _find_and_load File "<frozen importlib._bootstrap="">", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap="">", line 688, in _load_unlocked File "<frozen importlib._bootstrap_external="">", line 883, in exec_module File "<frozen importlib._bootstrap="">", line 241, in _call_with_frames_removed File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/linodecli/plugins/obj/__init</frozen></frozen></frozen></frozen></frozen></frozen>.py", line 52, in <module>
from linodecli.plugins.obj.objects import (
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/linodecli/plugins/obj/objects.py", line 10, in <module>
from boto3.exceptions import S3UploadFailedError
ModuleNotFoundError: No module named 'boto3'</module></module></module>

I have tried changing the paths without success. Can I simply delete/uninstall the python 2.7 in /Library/Frameworks/Python.framework/Versions/2.7/bin/python and update the python version? Any idea how to overcome this and access my odject in linode?

1 Reply

This process is compounded since you ultimately want Python3 to be installed, but you also need to be careful since the removal of Python2 can break your existing libraries.

Safely removing Python2:

Once it has been safely removed, you can then install Python3:

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct