I've spent the last week of my life trying to set up a development environment so I can learn machine learning. I have less hair now, not that I had too much before. Never mind.
I am using WSL 2 Ubuntu 20.04 on Windows 10.0.19054
After installing Cuda Toolkit and doing export path I now have this message when I log in
-bash: /home/me/.profile: line 28: syntax error near unexpected token `(' -bash: /home/me/.profile: line 28: `export PATH=/usr/local/cuda-11.8/bin:/home/me/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Python27/:/mnt/c/Python27/Scripts:
The path is much longer but I didn't put anything in it so I presume there are no errors there. I cut it so it wouldn't show the user name (is that correct to do?)
And I'm stuck. There's no `(' anywhere.
I am trying to export the path for Cuda toolkit, which for the 18.8 version looks different from other versions. For instance the the "cuda" folder I've seen in other examples is now "cuda-11.8"
The PATH has a lot of paths in "mnt/c" ... why?! I haven't installed anything there? Are they installed by Windows?
I am not a complete idiot. I know a bit of DOS and I understand Environment and Paths and syntax and stuff like. But my goal is not to learn Linux, I'm not a coder. I'm a 3d generalist trying to run some apps. Please fell free to educate me in how I should make posts here and I really hope someone will help me.
This is my first question here and also a total absolute newb in Linux. So please be kind :)
(for the unexpected error to make sense. Do you see more context if you run the file with
bash -x /home/me/.profile?
PATHis slightly dubious in this case if it really tells you that that's where the error is.
/mnt/c(with a leading slash, which is significant) is indeed how Windows paths are exposed, so presumably yes, this is a feature of WSL.
/home/me/.profileto e.g. pastebin.com or edit your question and paste it here.
"mnt/c" ... why?!because you run WSL.
Are they installed by Windows?installed is not the right word, but yes, it's because of Windows - you can stop that happening by editing(creating)
/etc/wsl.confand adding two lines,
[interop]and below that
appendWindowsPath = false
PATH=$PATH:/some/other/path) and the WSL
appendWindowsPathfeature has caused
PATHto contain something like
Program Files (x86). See for example bad variable name error on WSL.