Python 安装或安装工具时没有版本属性

Python 安装或安装工具时没有版本属性,python,ubuntu,or-tools,Python,Ubuntu,Or Tools,我正在尝试在Linux for Python上安装或安装工具,这是Google提供的一个优化库。 我正在使用一个新下载的VM Ubuntu16.10 Yakkety Yak,所以我怀疑我的系统是否有问题,除非ofc我没有安装我需要的东西 我也怀疑工具是否是问题所在。我对虚拟机没有任何意见,除了: sudo apt get安装python设置工具 sudo-apt-get-install-g++ 下载的Python-tar.gz,在下载中提取 在下载后运行makeinstall 我发现一个错误,

我正在尝试在Linux for Python上安装或安装工具,这是Google提供的一个优化库。

我正在使用一个新下载的VM Ubuntu16.10 Yakkety Yak,所以我怀疑我的系统是否有问题,除非ofc我没有安装我需要的东西

我也怀疑工具是否是问题所在。我对虚拟机没有任何意见,除了:

sudo apt get安装python设置工具 sudo-apt-get-install-g++ 下载的Python-tar.gz,在下载中提取 在下载后运行makeinstall

我发现一个错误,您使用的ortools模块没有版本属性。有人知道这意味着什么吗

我尝试了命令提示符建议的两个技巧:

正在运行/usr/bin/python setup.py install-用户可以正常工作,但错误警告:install_lib:'build/lib.linux-x86_64-2.7'不存在-没有要安装的python模块弹出

删除init.pyc文件会告诉我删除init.py文件,然后它会说找不到或工具

非常感谢您的帮助,我还在学习Linux,所以我确信我在做一些愚蠢的事情

make-install的完整输出:

python setup.py install --user
running install
running bdist_egg
running egg_info
writing requirements to ortools_examples.egg-info/requires.txt
writing ortools_examples.egg-info/PKG-INFO
writing top-level names to ortools_examples.egg-info/top_level.txt
writing dependency_links to ortools_examples.egg-info/dependency_links.txt
reading manifest file 'ortools_examples.egg-info/SOURCES.txt'
writing manifest file 'ortools_examples.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
warning: install_lib: 'build/lib.linux-x86_64-2.7' does not exist -- no            Python modules to install
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying ortools_examples.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying ortools_examples.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying ortools_examples.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying ortools_examples.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying ortools_examples.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/ortools_examples-6.0.4217-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing ortools_examples-6.0.4217-py2.7.egg
Removing /home/osboxes/.local/lib/python2.7/site-packages/ortools_examples-6.0.4217-py2.7.egg
Copying ortools_examples-6.0.4217-py2.7.egg to /home/osboxes/.local/lib/python2.7/site-packages
ortools-examples 6.0.4217 is already the active version in easy-install.pth
Installed /home/osboxes/.local/lib/python2.7/site-packages/ortools_examples-6.0.4217-py2.7.egg
Processing dependencies for ortools-examples==6.0.4217
Searching for ortools==6.0.4217
Best match: ortools 6.0.4217
Processing ortools-6.0.4217-py2.7-linux-x86_64.egg
ortools 6.0.4217 is already the active version in easy-install.pth
Using /home/osboxes/.local/lib/python2.7/site-packages/ortools-6.0.4217-py2.7-linux-x86_64.egg
Searching for protobuf==3.2.0
Best match: protobuf 3.2.0
Processing protobuf-3.2.0-py2.7.egg
protobuf 3.2.0 is already the active version in easy-install.pth
Using /home/osboxes/.local/lib/python2.7/site-packages/protobuf-3.2.0-py2.7.egg
Searching for setuptools==26.1.1
Best match: setuptools 26.1.1
Adding setuptools 26.1.1 to easy-install.pth file
Installing easy_install script to /home/osboxes/.local/bin
Using /usr/lib/python2.7/dist-packages
Searching for six==1.10.0
Best match: six 1.10.0
Processing six-1.10.0-py2.7.egg
six 1.10.0 is already the active version in easy-install.pth
Using /home/osboxes/.local/lib/python2.7/site-packages/six-1.10.0-py2.7.egg
Finished processing dependencies for ortools-examples==6.0.4217
python check_python_deps.py --log=ERROR
[ERROR] You are using a ortools module that doesn't have a version attribute : /home/osboxes/.local/lib/python2.7/site-packages/ortools-6.0.4217-py2.7-linux-x86_64.egg/ortools/init.pyc"
Run "/usr/bin/python setup.py install --user" to upgrade.
If the problem persists, remove the site-package that contains "/home/osboxes/.local/lib/python2.7/site-packages/ortools-6.0.4217-py2.7-linux-x86_64.egg/ortools/init.pyc". You can do so either manually or by using pip.
请参阅,其中详细说明了此错误:

当您尝试安装二进制发行版,但 安装程序无法为您的操作系统生成ortools包 系统在这种情况下,您仍然可以从安装和运行或工具 源文件,甚至自己构建python包。你能行 因此,通过以下步骤:

按照Linux/Mac OS X源代码安装或Windows源代码安装中的说明安装和编译或安装工具。 不要忘记通过运行maketest来确保一切正常。 运行makepypi_归档。您将在名为temp的目录下找到该包。 对我个人来说,在我的Ubuntu 16.04虚拟机上从源文件构建也不起作用,可能是由于虚拟化导致的一些错误

然而,我在Ubuntu16.04上找到了for或tools,使用easy_install很容易安装


他们比你的好,比如16.04和17.04。如果您即将升级,您可能需要尝试其中一种。否则,您可以尝试轻松安装操作系统非特定版本的.egg文件。

此问题不在实时版本上,已修复。看见