'ns3' is not recognized as an internal or external command, operable program or batch file.

64 views
Skip to first unread message

Johny Why

unread,
Apr 6, 2023, 8:30:56 PM4/6/23
to ns-3-users
Installing on Windows (WSL). 

What am i missing? 

I've done everything in the Installation pdf up to and including "2.2 Download". But i did everything at a Windows command line, not a Linux command-line. (i don't think i have a Linux command-line -- the installation guide doesn't show msys installation until the later chapter


Here's the contents of the dirs:

```
c:\ns-allinone-3.38\ns-3.38>dir
 Volume in drive C has no label.
 Volume Serial Number is 24DB-CF61

 Directory of c:\ns-allinone-3.38\ns-3.38

04/06/2023  04:32 PM    <DIR>          .
04/06/2023  04:25 PM    <DIR>          ..
03/16/2023  08:54 PM               682 .clang-format
03/16/2023  08:54 PM             1,686 .clang-tidy
03/16/2023  08:54 PM               691 .editorconfig
04/06/2023  04:25 PM    <DIR>          .vscode
03/16/2023  08:54 PM            13,148 AUTHORS
04/06/2023  04:25 PM    <DIR>          bindings
04/06/2023  04:25 PM    <DIR>          build-support
03/16/2023  08:54 PM           193,039 CHANGES.md
03/16/2023  08:54 PM             5,777 CMakeLists.txt
04/06/2023  04:25 PM    <DIR>          contrib
03/16/2023  08:54 PM            18,354 CONTRIBUTING.md
04/06/2023  04:25 PM    <DIR>          doc
04/06/2023  04:25 PM    <DIR>          examples
03/16/2023  08:54 PM            17,987 LICENSE
04/06/2023  04:52 PM    <DIR>          ns-3-dev
03/16/2023  08:54 PM            71,013 ns3
03/16/2023  08:54 PM             4,587 README.md
03/16/2023  08:54 PM           197,019 RELEASE_NOTES.md
04/06/2023  04:25 PM    <DIR>          scratch
04/06/2023  04:25 PM    <DIR>          src
03/16/2023  08:54 PM            83,622 test.py
04/06/2023  04:25 PM    <DIR>          utils
03/16/2023  08:54 PM             4,219 utils.py
03/16/2023  08:54 PM                 5 VERSION
              14 File(s)        611,829 bytes
              12 Dir(s)  36,310,728,704 bytes free
```

```
c:\ns-allinone-3.38\ns-3.38\ns-3-dev>dir
 Volume in drive C has no label.
 Volume Serial Number is 24DB-CF61

 Directory of c:\ns-allinone-3.38\ns-3.38\ns-3-dev

04/06/2023  04:52 PM    <DIR>          .
04/06/2023  04:32 PM    <DIR>          ..
04/06/2023  04:32 PM               682 .clang-format
04/06/2023  04:32 PM             1,686 .clang-tidy
04/06/2023  04:52 PM               163 .codespellrc
04/06/2023  04:32 PM               691 .editorconfig
04/06/2023  04:52 PM    <DIR>          .git
04/06/2023  04:32 PM                42 .gitattributes
04/06/2023  04:32 PM    <DIR>          .github
04/06/2023  04:32 PM               474 .gitignore
04/06/2023  04:32 PM             6,841 .mailmap
04/06/2023  04:32 PM    <DIR>          .vscode
04/06/2023  04:32 PM            13,148 AUTHORS
04/06/2023  04:32 PM    <DIR>          bindings
04/06/2023  04:52 PM    <DIR>          build-support
04/06/2023  04:52 PM           193,039 CHANGES.md
04/06/2023  04:32 PM             5,777 CMakeLists.txt
04/06/2023  04:32 PM    <DIR>          contrib
04/06/2023  04:32 PM            18,354 CONTRIBUTING.md
04/06/2023  04:52 PM    <DIR>          doc
04/06/2023  04:33 PM    <DIR>          examples
04/06/2023  04:32 PM            17,987 LICENSE
04/06/2023  04:52 PM            71,013 ns3
04/06/2023  04:32 PM             4,587 README.md
04/06/2023  04:52 PM           197,019 RELEASE_NOTES.md
04/06/2023  04:33 PM    <DIR>          scratch
04/06/2023  04:33 PM    <DIR>          src
04/06/2023  04:52 PM            83,622 test.py
04/06/2023  04:52 PM    <DIR>          utils
04/06/2023  04:33 PM             4,219 utils.py
04/06/2023  04:52 PM                 5 VERSION
              18 File(s)        619,349 bytes
              13 Dir(s)  36,310,282,240 bytes free
```

Gabriel Ferreira

unread,
Apr 6, 2023, 9:46:35 PM4/6/23
to ns-3-users
Use `python` or `python3` before calling `ns3`. Windows command line does not support shebang lines.

Johny Why

unread,
Apr 7, 2023, 3:31:04 AM4/7/23
to ns-3-users
If possible, I'd like to suggest you put that information in the installation guide. That would be helpful!

Gabriel Ferreira

unread,
Apr 7, 2023, 6:40:33 AM4/7/23
to ns-3-users
I was pretty sure it was there somewhere, but apparently isn't. Added that to my backlog. 
Reply all
Reply to author
Forward
0 new messages