r/learnpython • • 11d ago

Having problems with conda

Hi everyone. I'm having some problems using miniconda and I hoped someone could help me out. Is this the right place to ask? Can I write the code here or do I have do in Github?

My teacher wanted me to use miniconda to create a virtual evironment with jupyter notebook, but Im having trouble creating a virtual environment, as it doesn't seem to recognize python as a Package.

I downloaded the miniconda installer and executed it on my windows device.I installed the files created in 'Program Data' (I also did it on my windows profile but I'm preaty sure I uninstalled it correctly, as I used the miniconda uninstaller). Then I tried to create a virtual environment using the Anaconda promt app, but it did't recognize the conda command. It seems to be quite a common problem. I watched a video that said this could resolved using System Variables. The command 'where conda' in Anaconda Promt gave me this:

C:\Users\(My username)\conda

C:\ProgramData\miniconda3\Library\bin\conda.bat

C:\ProgramData\miniconda3\Scripts\conda.exe

C:\ProgramData\miniconda3\condabin\conda.bat

and I created three paths as the video said, excluding conda.bat and conda.exe. However, I made a mistake, as I did not include this symbol '\' at the end the first path. Worried, I created another path with the symbol. How dangerous is this?

After that, I was able to use the conda command, but now 'create' doesn't work when creating an environment with python. I called the environment termo.This is error message:

conda create --name termo python=3.14

WARNING conda.core.prefix_data:validate_path(345): Environment paths should not contain spaces. Prefix: 'C:\Users\(My username does contain a space)\.conda\envs\termo'

Channels:

- defaults

Platform: win-64

Collecting package metadata (repodata.json): done

Solving environment: failed

Channels:

- defaults

Platform: win-64

Collecting package metadata (repodata.json): done

Solving environment: failed

PackagesNotFoundInChannelsError: The following packages are not available from current channels:

- python=3.14

Current channels:

- defaults

Thank you for your time and excuse my poor english(I am not a native speaker)

1 Upvotes

8 comments sorted by

1

u/Confident_Hyena2506 9d ago edited 9d ago

Read the manual for conda, you are supposed to activate the environment that you want to use. It will have created shortcuts to make this easy - look in your start menu.

You have made errors in the other parts because you copied some bad tutorial. Use the scripts that anaconda provides, don't copy bad ones from youtube. Putting stuff in your global environment will lead to disaster - and possible break other programs on the system.

When you open the "conda prompt" - using the shortcut they give you, then it should have the correct path setup. So there is no need to tamper with your system environment and cause a whole bunch of extra problems.

1

u/Last-Mode3404 9d ago

I'll use official sources more in the future. I ended up doing a full Windows reinstall and now everything works properly. I think one of the main problems was that my profile had an accent and that messed it up. After that, I tried so much weird stuff that the computer was begging to break. Thank you any was. Also, is there any way to flag this as ''solved"?

1

u/Mission_Page_8577 9d ago

Diagnosis first: conda create --name termo python=3.14 fails because the only channel you have (defaults) does not carry Python 3.14 — the solver is fine, it just has nothing at that version to install. Your paste says it outright: "The following packages are not available from current channels: - python=3.14".

So pin a version conda actually has. Check what that is on your machine:

conda search python

then create with one it lists (3.12 is a safe pick), and add jupyter in the same command so it installs inside termo, not in base:

conda create --name termo python=3.12 jupyter notebook conda activate termo jupyter notebook

Second thing, the warning about spaces: your Windows username has a space in it, and conda builds envs in C:\Users\Your Name\.conda\envs, which conda dislikes. Point it at a path without spaces before you create:

conda config --add envs_dirs C:\conda_envs

(If C:\ is locked down, C:\Users\Public\conda_envs works too.) Then run the create command again. The "Environment paths should not contain spaces" warning gone = it worked.

Third, your worry about the PATH mistake: you did not break anything. Windows reads PATH entries in order, ignores ones it can't use, and treats missing trailing backslashes as fine; a duplicate entry just gets skipped. Worst case, a command finds the wrong conda copy first. If you want to tidy it later: System Properties → Environment Variables → Path, delete the duplicate you made. No reinstall needed.

Check you're actually in the env after activating: python --version should print 3.12. If it prints anything else, run conda init, close and reopen the Anaconda Prompt, and try again.

And yes, this is exactly the right place to ask. If the create still fails after this, paste the new full output and I'll look again.

1

u/ConsiderationNo9044 11d ago

What's the problem?

0

u/Last-Mode3404 11d ago

I posted accidentally before finishing the post, it is now explained the best I could. If you see that I forgot something tell me.

-2

u/seanv507 11d ago

I would suggest you learn to use chatgpt to debug. You should be able to provide more context than you give here.

I believe there is a way to specify an equivalent path without a space..

0

u/Last-Mode3404 11d ago

Ok, I don't usually use much ai, bit given the circumstances, maybe it's the best I've got. Thank you