[warning ] Could not create symlink: meltano.exe ...
# troubleshooting
i
[warning ] Could not create symlink: meltano.exe not present in C:\Users\User\AppData\Local\Programs\Python\Python310 > I've uninstalled and reinstalled pipx and meltano multiple times and ensured there's no symlink error in the pipx list > meltano.exe, but pipx isn't adding meltano.exe to python\python310. Any ideas?
e
Hi @Ian OLeary. Have you tried running
pipx ensurepath
?
1
b
When I install Meltano via pipx I usually see
meltano.exe
in the following directory c:\Users\[my username]\.local\bin
ty 1
i
@BuzzCutNorman That's where my meltano.exe is too, but how do i make meltano fix the symlink? I've tried running pipx ensurepath as well
its located in Python310\Scripts\meltano.exe after running "where meltano" - could I append Scripts\ to the end of Python310 somehow?
b
Are you using a
venv
and
pipx
at the same time? If you are try deactivating the
venv
and running
meltano --verison
just as a test to see if it runs alright via
pipx
.
i
It returns 'meltano, version 3.20' both inside and outside the project venv
b
That is good to hear, lets keep the
venv
deactivated for now. If you would please get out of you current project folder and lets try creating a new project let say
meltano init test-project
.
i
done
b
Nice, so we have a new project. Did you get any error messages when it was created?
i
Meltano will create the project, but again will throw that warning about the symlinks
b
Thank you for that info. I appreciate you working through this with me. Were you granted admin right on your machine like you requested ? If not that is fine just helps me to try and duplicate this on my end.
i
Yes - so basically they set up an admin account (didn't give me admin credentials on my main account) which I sign onto with ".\Admin"- so I went and installed python/pip/pipx/meltano as administrator on that profile since when I run cmd as admin it uses that "Admin" user and not my "Ian" user. I tried creating a project in there too and it's giving the same error. So the error is really "meltano.exe not present in C:\Users\AdminUserProfile\AppData\Local\Programs\Python\Python310"
But even when exclusively logged onto that profile creating a completely new project it throws that symlink error - after doing ensurepath, reinstalling pipx/meltano, etc...
b
I was working a while back to setup a Meltano server on windows that had a shared
pipx
install. You can do this by specifying a central folder you have given right to all users to. here is the documentation. I got it to work once I think it might solve the issue if it doesn't. There is a way to create the symlink manually if you have admin access which you do. A true fix would come via PR to Meltano.
👍 1
i
PR to Meltano?
b
A change to the code of Meltano via a github pull request or PR.
1
i
gotcha
I manually created the symlink and the meltano init project isn't throwing that error anymore - we'll see if everything else works
🙌 2
b
Ha I was typing this up but you already got it. nice work. The command for creating a symbolic link from the command line is here Creating Symbolic Links. I think you would want to point it to
C:\Users\[your login]\.local\bin\meltano.exe
. That is a total guess. You might have to play around with that a bit. You can see where the symlink is pointed with this command from inside a meltano project folder
dir .\.meltano\run\ -recurse -force | ?{$_.LinkType} | select FullName,LinkType,Target
.
🙌 1
i
the command I used was
mklink ".\Python\Python310\symlinkname.exe" ".\Python\Python310\Scripts\meltano.exe"
👀 1
😎 1
b
I thought you might like to you know I was able to recreate the issue you were having on my windows test environment. Thanks again for taking the time to go through the steps.
👀 1