I downgraded my python version from 3.10 to 3.9, a...
# troubleshooting
f
I downgraded my python version from 3.10 to 3.9, and now Meltano won't run at all 😞 I think it's because it's looking in the wrong spot for Python, the error is
Copy code
No Python at '"C:\Users\flier\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\python.exe'
c
How did you install meltano? Did you use
pipx
to install meltano?
f
I did use pipx, but that was when I had python 3.10 installed. i uninstalled python 3.10 and installed python 3.9 so that I could use some extractors that aren't compatible with python 3.10. But I have a feeling I should have uninstalled meltano as well when I uninstalled python 3.10.
c
Well. Not only do you need to uninstall meltano, but also pipx
Unfortunately, uninstalling
pipx
is not that easy, now that you have already un-installed Python 3.10. Because without Python 3.10, you can now no longer run
pip uninstall pipx
f
lolsob
i just made a lot of problems for myself. lol!
c
Well, the good thing on Windows is that you can have both 3.9 and 3.10 installed in parallel.
So, you should just re-install 3.10 and then you can un-install pipx again via something like ...
py.exe -3.10 -m pip uninstall pipx
If you are unfamiliar with the Python Launcher for Windows (
py.exe
), you can read up in its capabilities in section 4.8 of the Python documentation. https://docs.python.org/3/using/windows.html#python-launcher-for-windows
f
thank you!! i am going to use the docs and your advice and give this another go
c
The tricky part is to get a concept of the full installation chain. Basically the chain looks like (from top down): 1. Python interpreter installation (installed in your Windows User profile by using the python.org setup files) <- On Windows, you can easily have multiple Python versions installed in parallel and switch between them with the Python Launcher (py.exe) 2. `pipx`: This is the second step in the bootstrapping process.
pipx
itself is a Python package that you install by using your Python interpreter from step 1. At the point in time when you install
pipx
, the package contents of
pipx
should all be installed into a directory that is specific to your chosen version of the Python interpreter (at least that's what happens on Linux. I can't quite remember how the Python Interpreter does it on Windows). On Windows, using
py.exe
, you can control which version of Python to use when installing
pipx
in the form of
py.exe -3.9 -m pip install --user pipx
3. `meltano`: As
meltano
should be installed via
pipx
, the version of Python that
pipx
will use for installing the
meltano
package should be determined by the version of Python you chose in step 2 (at least that's what I think how
pipx
should behave on Windows) 4. Meltano plugins: Now when installing meltano plugins, they will execute using the version of Python that
pipx
used when installing
meltano
It's all a bit complex and probably shouldn't be that complex, but alas, that's what we get for trying to run many different python packages that may or may not all have conflicting dependencies and make them all work nicely in a meltano pipeline ...
s
FWIW, I'm a big (can't spell that big enough) fan of dockerized installations for everything that involves Python. Takes away all the pain, and leaves you with all the fun.
f
@Sven Balnojan docker is not something i've worked with before but it's definitely something i want to learn!
@christoph hesitantly optimistic that your advice has worked!! thank you!!
c
docker is not something i've worked with before but it's definitely something i want to learn!
I could not recommend ivan's courses more highly, if you really want to learn and understand it: https://www.ipspace.net/Introduction_to_Docker
f
@christoph bookmarked!! thank you!!