Conda install flub?

So, my normal python env is Conda’s 3.14f (free-threaded). Today I installed the yfinance package via Conda. It seems to have goofed on the install. The install worked fine, but the module couldn’t be found at import time. I found it here:

% find ~/miniconda3/envs/python314f -name '*yfinance*'
/Users/skip/miniconda3/envs/python314f/conda-meta/yfinance-0.2.18-pyhd8ed1ab_0.json
/Users/skip/miniconda3/envs/python314f/lib/python3.14/site-packages/yfinance
/Users/skip/miniconda3/envs/python314f/lib/python3.14/site-packages/yfinance-0.2.18.dist-info

Looking at sys.path, I don’t see a bare python3.14 directory:

>>> sys.path
['/Users/skip/misc/python/python3', '/Users/skip/misc/python', '', '/Users/skip/miniconda3/envs/python314f/lib/python3.14t', '/Users/skip/miniconda3/envs/python314f/lib/python3.14t/lib-dynload', '/Users/skip/.local/lib/python3.14t/site-packages', '/Users/skip/miniconda3/envs/python314f/lib/python3.14t/site-packages']

So, let’s try the Conda 3.13 env.

(python313) ~/src/python/cpython% python
Python 3.13.9 | packaged by conda-forge | (main, Oct 22 2025, 23:38:18) [Clang 19.1.7 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import yfinance
>>> yfinance.__file__
'/Users/skip/miniconda3/envs/python313/lib/python3.13/site-packages/yfinance/__init__.py'
>>> sys.path
['/Users/skip/misc/python/python3', '/Users/skip/misc/python', '', '/Users/skip/miniconda3/envs/python313/lib/python3.13', '/Users/skip/miniconda3/envs/python313/lib/python3.13/lib-dynload', '/Users/skip/.local/lib/python3.13/site-packages', '/Users/skip/miniconda3/envs/python313/lib/python3.13/site-packages']

That works much better.

Digging a bit deeper into the problem, it seems some of the yfinance dependencies installed into python314t/site-packages (most notably numpy and pandas), while most dependencies installed into python314/site-packages. Strange, very strange.

Is the bare python314 directory into which Conda installed the package incorrect, or is the Conda-provided python314t directory on sys.path incorrect? I guess it doesn’t matter which is correct, as Conda seems to be wrong in either case.

A bit more digging and recreation of the Conda python-freethreading environment suggests it messed up at environment creation. I wind up with both python3.14 and python3.14t directories. Hilarity ensues.

I suspect a Conda bug.

I’m not a user of yfinance, but maybe you can submit an issue?
conda-forge/yfinance-feedstock: A conda-smithy repository for yfinance.

I found a Conda channel on Zulip and asked there. It seems the dual directory issue is sort of to be expected. It’s not clear to me how that’s supposed to be handled, but at least I can deal with it myself.