如何在Windows 7上使用Cygwin正确安装NS-3模拟器

用户名

我需要在Windows 7上运行NS-3模拟器,因此我安装了cygwin以及devel,python和utils软件包。运行./build.py以下命令时出现问题

Traceback (most recent call last):
  File "./build.py", line 10, in <module>
    from util import run_command, fatal, CommandError
  File "/home/user-PC/ns-allinone-3.25/util.py", line 3, in <module>
    import subprocess
  File "/usr/lib/python2.7/subprocess.py", line 430, in <module>
    import pickle
  File "/usr/lib/python2.7/pickle.py", line 1266, in <module>
    import binascii as _binascii
ImportError: No such file or directory

请注意,我已将目录更改为包含build.py文件和ns-3目录中其他ns-3文件的目录{system root}/cygwin/home/user-PC

在我的ns-3.25文件夹中,我具有以下文件:

作者,doc,Makefile,scratch,testpy.supp,VERSION,waf-tools绑定,示例,README,src,utils,waf,wscript CHANGES.html,LICENSE,RELEASE_NOTES,test.py,utils.py,waf.bat, wutils.py。

在此版本ns-3的主文件夹中,我具有以下内容,包括ns-3.25文件夹:

烘烤,constants.pyc,pybindgen-0.17.0.post49 + ng0e4e3bc,util.pyc,build.py,netanim-3.107,自述文件,constants.py,ns-3.25,util.py。

我尝试了此命令,python -v build.py |& tee build.log并得到以下信息:

user@user-PC /home/user-PC/ns-allinone-3.25
$ python -v build.py |& tee build.log
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# /usr/lib/python2.7/site.pyc matches /usr/lib/python2.7/site.py
import site # precompiled from /usr/lib/python2.7/site.pyc
# /usr/lib/python2.7/os.pyc matches /usr/lib/python2.7/os.py
import os # precompiled from /usr/lib/python2.7/os.pyc
import errno # builtin
import posix # builtin
# /usr/lib/python2.7/posixpath.pyc matches /usr/lib/python2.7/posixpath.py
import posixpath # precompiled from /usr/lib/python2.7/posixpath.pyc
# /usr/lib/python2.7/stat.pyc matches /usr/lib/python2.7/stat.py
import stat # precompiled from /usr/lib/python2.7/stat.pyc
# /usr/lib/python2.7/genericpath.pyc matches /usr/lib/python2.7/genericpath.py
import genericpath # precompiled from /usr/lib/python2.7/genericpath.pyc
# /usr/lib/python2.7/warnings.pyc matches /usr/lib/python2.7/warnings.py
import warnings # precompiled from /usr/lib/python2.7/warnings.pyc
# /usr/lib/python2.7/linecache.pyc matches /usr/lib/python2.7/linecache.py
import linecache # precompiled from /usr/lib/python2.7/linecache.pyc
# /usr/lib/python2.7/types.pyc matches /usr/lib/python2.7/types.py
import types # precompiled from /usr/lib/python2.7/types.pyc
# /usr/lib/python2.7/UserDict.pyc matches /usr/lib/python2.7/UserDict.py
import UserDict # precompiled from /usr/lib/python2.7/UserDict.pyc
# /usr/lib/python2.7/_abcoll.pyc matches /usr/lib/python2.7/_abcoll.py
import _abcoll # precompiled from /usr/lib/python2.7/_abcoll.pyc
# /usr/lib/python2.7/abc.pyc matches /usr/lib/python2.7/abc.py
import abc # precompiled from /usr/lib/python2.7/abc.pyc
# /usr/lib/python2.7/_weakrefset.pyc matches /usr/lib/python2.7/_weakrefset.py
import _weakrefset # precompiled from /usr/lib/python2.7/_weakrefset.pyc
import _weakref # builtin
# /usr/lib/python2.7/copy_reg.pyc matches /usr/lib/python2.7/copy_reg.py
import copy_reg # precompiled from /usr/lib/python2.7/copy_reg.pyc
# /usr/lib/python2.7/traceback.pyc matches /usr/lib/python2.7/traceback.py
import traceback # precompiled from /usr/lib/python2.7/traceback.pyc
# /usr/lib/python2.7/sysconfig.pyc matches /usr/lib/python2.7/sysconfig.py
import sysconfig # precompiled from /usr/lib/python2.7/sysconfig.pyc
# /usr/lib/python2.7/re.pyc matches /usr/lib/python2.7/re.py
import re # precompiled from /usr/lib/python2.7/re.pyc
# /usr/lib/python2.7/sre_compile.pyc matches /usr/lib/python2.7/sre_compile.py
import sre_compile # precompiled from /usr/lib/python2.7/sre_compile.pyc
import _sre # builtin
# /usr/lib/python2.7/sre_parse.pyc matches /usr/lib/python2.7/sre_parse.py
import sre_parse # precompiled from /usr/lib/python2.7/sre_parse.pyc
# /usr/lib/python2.7/sre_constants.pyc matches /usr/lib/python2.7/sre_constants.py
import sre_constants # precompiled from /usr/lib/python2.7/sre_constants.pyc
dlopen("/usr/lib/python2.7/lib-dynload/_locale.dll", 2);
import _locale # dynamically loaded from /usr/lib/python2.7/lib-dynload/_locale.dll
# /usr/lib/python2.7/_sysconfigdata.pyc matches /usr/lib/python2.7/_sysconfigdata.py
import _sysconfigdata # precompiled from /usr/lib/python2.7/_sysconfigdata.pyc
# zipimport: found 90 names in /usr/lib/python2.7/site-packages/paramiko-1.16.0-py2.7.egg
# zipimport: found 29 names in /usr/lib/python2.7/site-packages/ecdsa-0.13-py2.7.egg
import encodings # directory /usr/lib/python2.7/encodings
# /usr/lib/python2.7/encodings/__init__.pyc matches /usr/lib/python2.7/encodings/__init__.py
import encodings # precompiled from /usr/lib/python2.7/encodings/__init__.pyc
# /usr/lib/python2.7/codecs.pyc matches /usr/lib/python2.7/codecs.py
import codecs # precompiled from /usr/lib/python2.7/codecs.pyc
import _codecs # builtin
# /usr/lib/python2.7/encodings/aliases.pyc matches /usr/lib/python2.7/encodings/aliases.py
import encodings.aliases # precompiled from /usr/lib/python2.7/encodings/aliases.pyc
# /usr/lib/python2.7/encodings/utf_8.pyc matches /usr/lib/python2.7/encodings/utf_8.py
import encodings.utf_8 # precompiled from /usr/lib/python2.7/encodings/utf_8.pyc
Python 2.7.10 (default, Jun  1 2015, 18:05:38)
[GCC 4.9.2] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
# /usr/lib/python2.7/__future__.pyc matches /usr/lib/python2.7/__future__.py
import __future__ # precompiled from /usr/lib/python2.7/__future__.pyc
# /usr/lib/python2.7/optparse.pyc matches /usr/lib/python2.7/optparse.py
import optparse # precompiled from /usr/lib/python2.7/optparse.pyc
# /usr/lib/python2.7/textwrap.pyc matches /usr/lib/python2.7/textwrap.py
import textwrap # precompiled from /usr/lib/python2.7/textwrap.pyc
# /usr/lib/python2.7/string.pyc matches /usr/lib/python2.7/string.py
import string # precompiled from /usr/lib/python2.7/string.pyc
dlopen("/usr/lib/python2.7/lib-dynload/strop.dll", 2);
import strop # dynamically loaded from /usr/lib/python2.7/lib-dynload/strop.dll
# /usr/lib/python2.7/gettext.pyc matches /usr/lib/python2.7/gettext.py
import gettext # precompiled from /usr/lib/python2.7/gettext.pyc
# /usr/lib/python2.7/locale.pyc matches /usr/lib/python2.7/locale.py
import locale # precompiled from /usr/lib/python2.7/locale.pyc
dlopen("/usr/lib/python2.7/lib-dynload/operator.dll", 2);
import operator # dynamically loaded from /usr/lib/python2.7/lib-dynload/operator.dll
# /usr/lib/python2.7/functools.pyc matches /usr/lib/python2.7/functools.py
import functools # precompiled from /usr/lib/python2.7/functools.pyc
dlopen("/usr/lib/python2.7/lib-dynload/_functools.dll", 2);
import _functools # dynamically loaded from /usr/lib/python2.7/lib-dynload/_functools.dll
# /usr/lib/python2.7/copy.pyc matches /usr/lib/python2.7/copy.py
import copy # precompiled from /usr/lib/python2.7/copy.pyc
# /usr/lib/python2.7/weakref.pyc matches /usr/lib/python2.7/weakref.py
import weakref # precompiled from /usr/lib/python2.7/weakref.pyc
# /usr/lib/python2.7/struct.pyc matches /usr/lib/python2.7/struct.py
import struct # precompiled from /usr/lib/python2.7/struct.pyc
dlopen("/usr/lib/python2.7/lib-dynload/_struct.dll", 2);
import _struct # dynamically loaded from /usr/lib/python2.7/lib-dynload/_struct.dll
import xml # directory /usr/lib/python2.7/xml
# /usr/lib/python2.7/xml/__init__.pyc matches /usr/lib/python2.7/xml/__init__.py
import xml # precompiled from /usr/lib/python2.7/xml/__init__.pyc
import xml.dom # directory /usr/lib/python2.7/xml/dom
# /usr/lib/python2.7/xml/dom/__init__.pyc matches /usr/lib/python2.7/xml/dom/__init__.py
import xml.dom # precompiled from /usr/lib/python2.7/xml/dom/__init__.pyc
# /usr/lib/python2.7/xml/dom/domreg.pyc matches /usr/lib/python2.7/xml/dom/domreg.py
import xml.dom.domreg # precompiled from /usr/lib/python2.7/xml/dom/domreg.pyc
# /usr/lib/python2.7/xml/dom/minicompat.pyc matches /usr/lib/python2.7/xml/dom/minicompat.py
import xml.dom.minicompat # precompiled from /usr/lib/python2.7/xml/dom/minicompat.pyc
# /usr/lib/python2.7/xml/dom/minidom.pyc matches /usr/lib/python2.7/xml/dom/minidom.py
import xml.dom.minidom # precompiled from /usr/lib/python2.7/xml/dom/minidom.pyc
# /usr/lib/python2.7/xml/dom/xmlbuilder.pyc matches /usr/lib/python2.7/xml/dom/xmlbuilder.py
import xml.dom.xmlbuilder # precompiled from /usr/lib/python2.7/xml/dom/xmlbuilder.pyc
# /usr/lib/python2.7/xml/dom/NodeFilter.pyc matches /usr/lib/python2.7/xml/dom/NodeFilter.py
import xml.dom.NodeFilter # precompiled from /usr/lib/python2.7/xml/dom/NodeFilter.pyc
# /usr/lib/python2.7/shlex.pyc matches /usr/lib/python2.7/shlex.py
import shlex # precompiled from /usr/lib/python2.7/shlex.pyc
# /usr/lib/python2.7/collections.pyc matches /usr/lib/python2.7/collections.py
import collections # precompiled from /usr/lib/python2.7/collections.pyc
dlopen("/usr/lib/python2.7/lib-dynload/_collections.dll", 2);
import _collections # dynamically loaded from /usr/lib/python2.7/lib-dynload/_collections.dll
# /usr/lib/python2.7/keyword.pyc matches /usr/lib/python2.7/keyword.py
import keyword # precompiled from /usr/lib/python2.7/keyword.pyc
# /usr/lib/python2.7/heapq.pyc matches /usr/lib/python2.7/heapq.py
import heapq # precompiled from /usr/lib/python2.7/heapq.pyc
dlopen("/usr/lib/python2.7/lib-dynload/itertools.dll", 2);
import itertools # dynamically loaded from /usr/lib/python2.7/lib-dynload/itertools.dll
dlopen("/usr/lib/python2.7/lib-dynload/_heapq.dll", 2);
import _heapq # dynamically loaded from /usr/lib/python2.7/lib-dynload/_heapq.dll
import thread # builtin
dlopen("/usr/lib/python2.7/lib-dynload/cStringIO.dll", 2);
import cStringIO # dynamically loaded from /usr/lib/python2.7/lib-dynload/cStringIO.dll
# /home/user-PC/ns-allinone-3.25/constants.pyc matches /home/user-PC/ns-allinone-3.25/constants.py
import constants # precompiled from /home/user-PC/ns-allinone-3.25/constants.pyc
# /home/user-PC/ns-allinone-3.25/util.pyc matches /home/user-PC/ns-allinone-3.25/util.py
import util # precompiled from /home/user-PC/ns-allinone-3.25/util.pyc
# /usr/lib/python2.7/subprocess.pyc matches /usr/lib/python2.7/subprocess.py
import subprocess # precompiled from /usr/lib/python2.7/subprocess.pyc
import gc # builtin
dlopen("/usr/lib/python2.7/lib-dynload/time.dll", 2);
import time # dynamically loaded from /usr/lib/python2.7/lib-dynload/time.dll
dlopen("/usr/lib/python2.7/lib-dynload/select.dll", 2);
import select # dynamically loaded from /usr/lib/python2.7/lib-dynload/select.dll
dlopen("/usr/lib/python2.7/lib-dynload/fcntl.dll", 2);
import fcntl # dynamically loaded from /usr/lib/python2.7/lib-dynload/fcntl.dll
# /usr/lib/python2.7/pickle.pyc matches /usr/lib/python2.7/pickle.py
import pickle # precompiled from /usr/lib/python2.7/pickle.pyc
import marshal # builtin
dlopen("/usr/lib/python2.7/lib-dynload/binascii.dll", 2);
Traceback (most recent call last):
  File "build.py", line 10, in <module>
    from util import run_command, fatal, CommandError
  File "/home/user-PC/ns-allinone-3.25/util.py", line 3, in <module>
    import subprocess
  File "/usr/lib/python2.7/subprocess.py", line 430, in <module>
    import pickle
  File "/usr/lib/python2.7/pickle.py", line 1266, in <module>
    import binascii as _binascii
ImportError: No such file or directory
# clear __builtin__._
# clear sys.path
# clear sys.argv
# clear sys.ps1
# clear sys.ps2
# clear sys.exitfunc
# clear sys.exc_type
# clear sys.exc_value
# clear sys.exc_traceback
# clear sys.last_type
# clear sys.last_value
# clear sys.last_traceback
# clear sys.path_hooks
# clear sys.path_importer_cache
# clear sys.meta_path
# clear sys.flags
# clear sys.float_info
# restore sys.stdin
# restore sys.stdout
# restore sys.stderr
# cleanup __main__
# cleanup[1] cStringIO
# cleanup[1] __future__
# cleanup[1] site
# cleanup[1] sysconfig
# cleanup[1] thread
# cleanup[1] gc
# cleanup[1] select
# cleanup[1] abc
# cleanup[1] _weakrefset
# cleanup[1] gettext
# cleanup[1] sre_constants
# cleanup[1] constants
# cleanup[1] _codecs
# cleanup[1] zope
# cleanup[1] collections
# cleanup[1] _struct
# cleanup[1] _heapq
# cleanup[1] _warnings
# cleanup[1] shlex
# cleanup[1] fcntl
# cleanup[1] zipimport
# cleanup[1] _sysconfigdata
# cleanup[1] optparse
# cleanup[1] struct
# cleanup[1] textwrap
# cleanup[1] _collections
# cleanup[1] strop
# cleanup[1] _functools
# cleanup[1] keyword
# cleanup[1] signal
# cleanup[1] traceback
# cleanup[1] marshal
# cleanup[1] itertools
# cleanup[1] posix
# cleanup[1] exceptions
# cleanup[1] _weakref
# cleanup[1] heapq
# cleanup[1] locale
# cleanup[1] functools
# cleanup[1] encodings
# cleanup[1] operator
# cleanup[1] string
# cleanup[1] encodings.utf_8
# cleanup[1] codecs
# cleanup[1] encodings.aliases
# cleanup[1] re
# cleanup[1] _locale
# cleanup[1] sre_compile
# cleanup[1] _sre
# cleanup[1] sre_parse
# cleanup[2] copy_reg
# cleanup[2] xml.dom
# cleanup[2] xml.dom.NodeFilter
# cleanup[2] xml
# cleanup[2] posixpath
# cleanup[2] errno
# cleanup[2] _abcoll
# cleanup[2] xml.dom.minicompat
# cleanup[2] types
# cleanup[2] genericpath
# cleanup[2] stat
# cleanup[2] warnings
# cleanup[2] UserDict
# cleanup[2] xml.dom.domreg
# cleanup[2] copy
# cleanup[2] os.path
# cleanup[2] xml.dom.minidom
# cleanup[2] weakref
# cleanup[2] linecache
# cleanup[2] time
# cleanup[2] xml.dom.xmlbuilder
# cleanup[2] os
# cleanup sys
# cleanup __builtin__
# cleanup ints: 726 unfreed ints
# cleanup floats

我也尝试烤,并得到以下内容:

user@user-PC /home/user-PC/ns-allinone-3.25/bake/bake
$ ./Bake.py build
./Bake.py: line 26: $' \n Bake.py\n\n This is the main Bake file, it stores all the classes related to the\n basic Bake operation. The class Bake is responsible to identify and \n execute the defined options  \n': command not found
C:/cygwin64/bin/import.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
./Bake.py: line 29: try:: command not found
./Bake.py: line 30: from: command not found
./Bake.py: line 31: except: command not found
./Bake.py: line 32: from: command not found
C:/cygwin64/bin/import.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
C:/cygwin64/bin/import.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
C:/cygwin64/bin/import.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
C:/cygwin64/bin/import.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
C:/cygwin64/bin/import.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
C:/cygwin64/bin/import.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
./Bake.py: line 39: from: command not found
./Bake.py: line 40: from: command not found
./Bake.py: line 41: from: command not found
./Bake.py: line 42: from: command not found
./Bake.py: line 43: from: command not found
./Bake.py: line 44: from: command not found
./Bake.py: line 45: from: command not found
./Bake.py: line 46: from: command not found
./Bake.py: line 47: from: command not found
./Bake.py: line 48: from: command not found
./Bake.py: line 50: syntax error near unexpected token `('
./Bake.py: line 50: `def signal_handler(signal, frame):'

cygcheck -c输出。如何成功安装NS-3?

Matzeri

https://www.nsnam.org/docs/release/3.25/tutorial/singlehtml/index.html#building-ns3

似乎有效。(第一步编译了2357个文件,所以有点长)

要调试问题并保存所有日志记录,以便更好地了解缺少的内容:

python -v build.py |& tee build.log

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

如何在ios 7.0模拟器上安装IPA

来自分类Dev

如何在Ubuntu 14.04上安装术语模拟器?

来自分类Dev

如何在Linux上安装Andy Android模拟器?

来自分类Dev

如何安装iOS 10模拟器

来自分类Dev

如何使用Chisel C ++模拟器

来自分类Dev

如何在模拟器上运行UIAutomator?

来自分类Dev

如何在iOS模拟器上测试iPad Pro

来自分类Dev

如何在模拟器上运行Raspbian Jessie?

来自分类Dev

如何在模拟器上运行Google Maps

来自分类Dev

如何在Ubuntu 16.04上获取Android模拟器

来自分类Dev

如何在Windows Phone 8模拟器上测试网络超时异常

来自分类Dev

如何在Windows Phone模拟器上启用Wi-Fi和搜索网络

来自分类Dev

如何在Windows Phone 8.1模拟器上测试自动启动

来自分类Dev

如何在 HoloLens 模拟器上运行 Windows 应用程序包项目?

来自分类Dev

如何在Reactfire中使用Firestore模拟器?

来自分类Dev

如何使用Windows Phone模拟器输入新行

来自分类Dev

Windows 7上的模拟器非常慢

来自分类Dev

如何为“Visual Studio 模拟器 for android”的模拟器安装证书?

来自分类Dev

xCode升级缺少的模拟器。如何使用本地存储的模拟器?

来自分类Dev

如何在Android Wear模拟器上模拟来自心率传感器的数据?

来自分类Dev

在Mac上使用Windows模拟器输入反斜杠

来自分类Dev

在Windows Phone模拟器上使用ProcMon

来自分类Dev

从Windows USB备份在模拟器中安装Windows

来自分类Dev

在Windows 10 PC上运行Windows 8.1模拟器

来自分类Dev

如何在模拟器上运行UWP应用并模拟位置?

来自分类Dev

无法安装Windows Phone 8.1模拟器

来自分类Dev

如何在xCode 5上安装iOS 4.3模拟器?

来自分类Dev

如何在 Ubuntu 20.04 上安装任天堂模拟器 gfceu

来自分类Dev

Windows 10上模拟器的奇怪行为

Related 相关文章

  1. 1

    如何在ios 7.0模拟器上安装IPA

  2. 2

    如何在Ubuntu 14.04上安装术语模拟器?

  3. 3

    如何在Linux上安装Andy Android模拟器?

  4. 4

    如何安装iOS 10模拟器

  5. 5

    如何使用Chisel C ++模拟器

  6. 6

    如何在模拟器上运行UIAutomator?

  7. 7

    如何在iOS模拟器上测试iPad Pro

  8. 8

    如何在模拟器上运行Raspbian Jessie?

  9. 9

    如何在模拟器上运行Google Maps

  10. 10

    如何在Ubuntu 16.04上获取Android模拟器

  11. 11

    如何在Windows Phone 8模拟器上测试网络超时异常

  12. 12

    如何在Windows Phone模拟器上启用Wi-Fi和搜索网络

  13. 13

    如何在Windows Phone 8.1模拟器上测试自动启动

  14. 14

    如何在 HoloLens 模拟器上运行 Windows 应用程序包项目?

  15. 15

    如何在Reactfire中使用Firestore模拟器?

  16. 16

    如何使用Windows Phone模拟器输入新行

  17. 17

    Windows 7上的模拟器非常慢

  18. 18

    如何为“Visual Studio 模拟器 for android”的模拟器安装证书?

  19. 19

    xCode升级缺少的模拟器。如何使用本地存储的模拟器?

  20. 20

    如何在Android Wear模拟器上模拟来自心率传感器的数据?

  21. 21

    在Mac上使用Windows模拟器输入反斜杠

  22. 22

    在Windows Phone模拟器上使用ProcMon

  23. 23

    从Windows USB备份在模拟器中安装Windows

  24. 24

    在Windows 10 PC上运行Windows 8.1模拟器

  25. 25

    如何在模拟器上运行UWP应用并模拟位置?

  26. 26

    无法安装Windows Phone 8.1模拟器

  27. 27

    如何在xCode 5上安装iOS 4.3模拟器?

  28. 28

    如何在 Ubuntu 20.04 上安装任天堂模拟器 gfceu

  29. 29

    Windows 10上模拟器的奇怪行为

热门标签

归档