Anaconda installed however it is trying to use python 3.10 that was previously installed

I uninstalled and reinstalled anaconda. I still am having problems. I have installed python 3.10 on my computer c:\py310 folder prior to the anaconda install. Anaconda is now referencing this folder for modules and there is no reference to the anaconda installation which is running python 3.9. none of the applications work when clicked on the start menu in windows. the folder for anaconda is f:\anaconda\kev. All of the documentation says that I can keep python 3.10 but I can not get anaconda to work any ideas?

File “C:\Python310\lib\io.py”, line 54, in
ImportError: cannot import name ‘text_encoding’ from ‘io’ (unknown location) this is the trace back error.

1 Like

from ktsh.tanaka.2020 to Kevin_Gardner

A similar problem you encountered is in Stackoverflow.

Windows thinks Python 3.10 you have installed is the correct Python.

Therefore, to resolve this issue, you must select both in the “Advanced Installation Option” during installation.

For more information, please refer to

Regards you.
ktsh.tanaka.2020

@Kevin_Gardner What exactly happens when you open the Anaconda Prompt? I would expect a command prompt window to open with the base Anaconda environment to be activated.

Hi, I get the cannot find module import error. And it does not connect to anything in the anaconda folder. Basically, nothing works even though it is installed. To get around this problem in windows. I installed anaconda in linux/Ubuntu. I am running it in wsl.

First of all, thank you for your help. I uninstalled and then reinstalled anaconda like you said. I am still getting the same error. So, I decided to install anaconda in Linux using wsl and it works. I still don’t know why I could not get the windows installation to work.

Regards,

Kevin

from ktsh.tanaka.2020 to Kevin_Gardner

hello,
I think the cause is that the Python Path on Windows refers to Python 3.10.

As it is also.

If PYTHONPATH refers to Python in Anaconda, it works normally both from the command line and from Jupyter. However, in this case, the previously installed Python will not work.

To make both coexist, yes, it’s good to use WSL. Also, virtual box
https://www.virtualbox.org/
You can also use to boot multiple operating systems.

Regards, you
ktsh.tanaka.2020

The terminal opens and I get the import error. It is trying to use my python 3.10 install. I replied to you as well via email. I installed anaconda in wsl using ubuntu and this works. I am totally confused as to why I can’t get it to work in windows.
thanks again for your help,
kevin

from ktsh.tanaka.2020 to Kevin_Gardner

Thank you for your frequent replies.
I think the reason Anaconda doesn’t work well on your PC’s Windows is because of a PYTHONPATH conflict.

This is because PYTHONPATH has been set on the Python3.10 side, and even if Anaconda starts, it is trying to retrieve files such as site packages from there.

Let’s make the problem a little more specific. In the case of WSL, bash is used, so PYTHONPATH is
export PATH = “/ home / kevin / anaconda3 / bin: $ PATH”
It works correctly because it is set by.

However, in the case of Windows, I think this is because it indicates Python installed on Windows, as shown in.

windows Environment variable

To avoid this problem, you have to switch environment variables every time you use Anaconda, which is currently difficult due to the Windows specification.

In other words, I think that it is correct for now to run Anaconda by running another OS on Windows using WSL or VirtualBOX.

In my case, when Anaconda and Python coexist on Windows, I use VirtualBOX and Anaconda installed on Ubuntu or Fedora.

I wrote it for a long time. sorry.

Regards, you.
ktsh.tanaka.2020

Yeah, I agree with @ktsh.tanaka.2020 - it is probably either that your PYTHONPATH is set to the other installation - or it is set to the other installation in your windows registry. So, even with anaconda installed, even with the Anaconda Prompt - that other installation is taking preference.
I’m glad to hear you do have it working with WSL!

1 Like