-1
NS3_MODULE_PATH = ['/usr/local/sbin', '/usr/local/bin', '/usr/sbin', '/usr/bin', '/sbin', '/bin', '/usr/games', '/usr/local/games', '/usr/lib/wsl/lib', '/mnt/c/Program Files/Common Files/Oracle/Java/javapath', '/mnt/c/Windows/system32', '/mnt/c/Windows', '/mnt/c/Windows/System32/Wbem', '/mnt/c/Windows/System32/WindowsPowerShell/v1.0/', '/mnt/c/Windows/System32/OpenSSH/', '/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common', '/mnt/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR', '/mnt/c/WINDOWS/system32', '/mnt/c/WINDOWS', '/mnt/c/WINDOWS/System32/Wbem', '/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/', '/mnt/c/WINDOWS/System32/OpenSSH/', '/mnt/c/Program Files/Java/jdk-19/bin', '/mnt/c/Users/Ayaan's/AppData/Local/Microsoft/WindowsApps', '/mnt/c/Users/Ayaan's/AppData/Local/Programs/Microsoft VS Code/bin', '/mnt/c/flutter/bin', '/snap/bin', '/home/ayaan/workspace/ns-allinone-3.37/ns-3.37/build', '/home/ayaan/workspace/ns-allinone-3.37/ns-3.37/build/lib']

enter image description here

enter image description here

I think the problem is due to the name of my path because it has a special character. It think it's "Ayaan's" that is causing some problems.

2
  • If you don't need Windows components in your PATH, you can configure WSL to not append them. See Interop settings. Commented Jan 23, 2023 at 18:33
  • I am very new at this can you help me a little more
    – Ayaan
    Commented Jan 24, 2023 at 4:33

1 Answer 1

1

You are likely correct - the issue is the unbalanced single quote in the NS3_MODULE_PATH component:

... , '/mnt/c/Users/Ayaan's/AppData/Local/Microsoft/WindowsApps', ...

Assuming that:

  1. your NS3_MODULE_PATH is based on the PATH environment variable (e.g. via os.path); and

  2. you don't really need your PATH to include Windows directories

Then probably the simplest fix is to configure WSL not to append the Windows path to your Ubuntu PATH variable. You can do so in WSL1 by creating the following minimal /etc/wsl.conf file (e.g. with sudo nano /etc/wsl.conf):

[interop]
appendWindowsPath=false

You will need to restart the WSL instance for the changes to take effect - you may find (as I did) that simply closing the WSL window is insufficient to do that, in which case you will need to use wsl --terminate from a Windows PowerShell or cmd.exe prompt:

> wsl --list --running
Windows Subsystem for Linux Distributions:
Ubuntu-20.04 (Default)

> wsl --terminate Ubuntu-20.04

> wsl --list --running
There are no running distributions.   

See for example Advanced settings configuration in WSL.

If you do need the Windows path to be appended, then you will need to modify how you derive NS3_MODULE_PATH from it in order to exclude the troublesome component(s).

1
  • thank you so much it worked
    – Ayaan
    Commented Feb 24, 2023 at 4:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .