Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
But when I try to call the software typing "conda", I get the following error.
Would anyone have an idea where does the problem come from?
Code:
An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Traceback (most recent call last):
File "/home/usr/.local/lib/python3.9/site-packages/conda/exceptions.py", line 626, in conda_exception_handler
return_value = func(*args, **kwargs)
File "/home/usr/.local/lib/python3.9/site-packages/conda/cli/main.py", line 98, in _main
imported = importlib.import_module(module)
File "/home/usr/anaconda3/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/home/usr/.local/lib/python3.9/site-packages/conda/cli/main_list.py", line 20, in <module>
from ..egg_info import get_egg_info
File "/home/usr/.local/lib/python3.9/site-packages/conda/egg_info.py", line 15, in <module>
from .misc import rel_path
File "/home/usr/.local/lib/python3.9/site-packages/conda/misc.py", line 19, in <module>
from .core.index import get_index, _supplement_index_with_cache
File "/home/usr/.local/lib/python3.9/site-packages/conda/core/index.py", line 8, in <module>
from .package_cache import PackageCache
File "/home/usr/.local/lib/python3.9/site-packages/conda/core/package_cache.py", line 10, in <module>
from .path_actions import CacheUrlAction, ExtractPackageAction
File "/home/usr/.local/lib/python3.9/site-packages/conda/core/path_actions.py", line 31, in <module>
from ..gateways.download import download
File "/home/usr/.local/lib/python3.9/site-packages/conda/gateways/download.py", line 16, in <module>
from ..connection import CondaSession
File "/home/usr/.local/lib/python3.9/site-packages/conda/connection.py", line 44, in <module>
distinfo = platform.linux_distribution()
AttributeError: module 'platform' has no attribute 'linux_distribution'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/usr/anaconda3/bin/conda", line 13, in <module>
sys.exit(main())
File "/home/usr/.local/lib/python3.9/site-packages/conda/cli/main.py", line 162, in main
return conda_exception_handler(_main, *args)
File "/home/usr/.local/lib/python3.9/site-packages/conda/exceptions.py", line 630, in conda_exception_handler
return handle_exception(e)
File "/home/usr/.local/lib/python3.9/site-packages/conda/exceptions.py", line 620, in handle_exception
print_unexpected_error_message(e)
File "/home/usr/.local/lib/python3.9/site-packages/conda/exceptions.py", line 578, in print_unexpected_error_message
info_stdout, info_stderr = get_info()
File "/home/usr/.local/lib/python3.9/site-packages/conda/exceptions.py", line 548, in get_info
args.func(args, p)
File "/home/usr/.local/lib/python3.9/site-packages/conda/cli/main_info.py", line 148, in execute
from conda.api import get_index
File "/home/usr/.local/lib/python3.9/site-packages/conda/api.py", line 1, in <module>
from .core.index import get_index
File "/home/usr/.local/lib/python3.9/site-packages/conda/core/index.py", line 8, in <module>
from .package_cache import PackageCache
File "/home/usr/.local/lib/python3.9/site-packages/conda/core/package_cache.py", line 10, in <module>
from .path_actions import CacheUrlAction, ExtractPackageAction
File "/home/usr/.local/lib/python3.9/site-packages/conda/core/path_actions.py", line 31, in <module>
from ..gateways.download import download
File "/home/usr/.local/lib/python3.9/site-packages/conda/gateways/download.py", line 16, in <module>
from ..connection import CondaSession
File "/home/usr/.local/lib/python3.9/site-packages/conda/connection.py", line 44, in <module>
distinfo = platform.linux_distribution()
AttributeError: module 'platform' has no attribute 'linux_distribution'
Last edited by Drosera_capensis; 03-10-2022 at 10:22 AM.
It is odd that Anaconda consider my version of python is 3.8.
I have made a little test:
Code:
python3.9 --version
Python 3.9.7
I think you suggest to report the issue in the Anaconda Github?
I did so, and they are suggesting I have an outdated version of conda. But I have tried several time to uninstall miniconda3 and anaconda3 and to re-install everything, and the issue persist.
I guess you installed python without anaconda (on ubuntu) and also anaconda installed it for you (a different version). And now anaconda is confused about that.
It is odd that Anaconda consider my version of python is 3.8.
I have made a little test:
Code:
python3.9 --version
Python 3.9.7
Yes, I could see from your first post that you are using python 3.9.
Quote:
Originally Posted by Drosera_capensis
I think you suggest to report the issue in the Anaconda Github?
I did so, and they are suggesting I have an outdated version of conda. But I have tried several time to uninstall miniconda3 and anaconda3 and to re-install everything, and the issue persist.
The output you posted shows that the code is trying to use a feature, platform.linux_distribution(), that has been deprecated since python 3.5 and removed in python 3.8 (that was detailed in the link I posted). It will not work with python 3.9.
Here is the important part of the error from your original post
Code:
File "/home/usr/.local/lib/python3.9/site-packages/conda/connection.py", line 44, in <module>
distinfo = platform.linux_distribution()
AttributeError: module 'platform' has no attribute 'linux_distribution'
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.