sudo pip3 install pyomocord@cord-Latitude-E7440:~$ sudo pip3 install --upgrade pyomo
Cleaning up...
Exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/req.py", line 810, in check_if_exists
self.satisfied_by = pkg_resources.get_distribution(self.req)
File "/usr/local/lib/python3.4/dist-packages/setuptools-1.1.5-py3.4.egg/pkg_resources.py", line 350, in get_distribution
if isinstance(dist,Requirement): dist = get_provider(dist)
File "/usr/local/lib/python3.4/dist-packages/setuptools-1.1.5-py3.4.egg/pkg_resources.py", line 229, in get_provider
return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
File "/usr/local/lib/python3.4/dist-packages/setuptools-1.1.5-py3.4.egg/pkg_resources.py", line 673, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/local/lib/python3.4/dist-packages/setuptools-1.1.5-py3.4.egg/pkg_resources.py", line 580, in resolve
raise VersionConflict(dist,req) # XXX put more info here
pkg_resources.VersionConflict: (PyUtilib 4.7.3340 (/usr/local/lib/python3.4/dist-packages), Requirement.parse('PyUtilib>=5.0'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python3/dist-packages/pip/req.py", line 1090, in prepare_files
req_to_install.check_if_exists()
File "/usr/lib/python3/dist-packages/pip/req.py", line 814, in check_if_exists
existing_dist = pkg_resources.get_distribution(self.req.project_name)
File "/usr/local/lib/python3.4/dist-packages/setuptools-1.1.5-py3.4.egg/pkg_resources.py", line 350, in get_distribution
if isinstance(dist,Requirement): dist = get_provider(dist)
File "/usr/local/lib/python3.4/dist-packages/setuptools-1.1.5-py3.4.egg/pkg_resources.py", line 229, in get_provider
return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
File "/usr/local/lib/python3.4/dist-packages/setuptools-1.1.5-py3.4.egg/pkg_resources.py", line 673, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/local/lib/python3.4/dist-packages/setuptools-1.1.5-py3.4.egg/pkg_resources.py", line 580, in resolve
raise VersionConflict(dist,req) # XXX put more info here
pkg_resources.VersionConflict: (PyUtilib 4.7.3340 (/usr/local/lib/python3.4/dist-packages), Requirement.parse('PyUtilib>=5.0'))
Storing debug log for failure in /home/cord/.pip/pip.log
--
You received this message because you are subscribed to the Google Groups "Pyomo Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyomo-forum...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
cord@cord-Latitude-E7440:~$ sudo pip3 install pyomo
Downloading/unpacking pyomo
Downloading Pyomo-4.0.9682-py3-none-any.whl (1.1MB): 1.1MB downloaded
Requirement already satisfied (use --upgrade to upgrade): six>=1.6.1 in /usr/local/lib/python3.4/dist-packages (from pyomo)
Requirement already satisfied (use --upgrade to upgrade): ply in /usr/local/lib/python3.4/dist-packages (from pyomo)
Requirement already satisfied (use --upgrade to upgrade): PyUtilib>=5.0 in /usr/local/lib/python3.4/dist-packages/PyUtilib-5.0.3478-py3.4.egg (from pyomo)
Requirement already satisfied (use --upgrade to upgrade): nose in ./.local/lib/python3.4/site-packages (from pyomo)
Installing collected packages: pyomo
Successfully installed pyomo
Cleaning up...
cord@cord-Latitude-E7440:~$ sudo pip3 install --upgrade pyomo
Requirement already up-to-date: pyomo in /usr/local/lib/python3.4/dist-packages
Cleaning up...
cord@cord-Latitude-E7440:~$
>>> runfile('/home/cord/Programmierung/DLSK/Vereinfachtes_Kraftwerksmodell/mdl_power_plant_spot_tr_basic_plot_farbe.py', wdir='/home/cord/Programmierung/DLSK/Vereinfachtes_Kraftwerksmodell')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.4/dist-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 682, in runfile
execfile(filename, namespace)
File "/usr/local/lib/python3.4/dist-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 85, in execfile
exec(compile(open(filename, 'rb').read(), filename, 'exec'), namespace)
File "/home/cord/Programmierung/DLSK/Vereinfachtes_Kraftwerksmodell/mdl_power_plant_spot_tr_basic_plot_farbe.py", line 20, in <module>
from pyomo.environ import *
File "/usr/local/lib/python3.4/dist-packages/pyomo/environ/__init__.py", line 13, in <module>
import pyomo.core
File "/usr/local/lib/python3.4/dist-packages/pyomo/core/__init__.py", line 11, in <module>
PluginGlobals.add_env("pyomo")
AttributeError: type object 'PluginGlobals' has no attribute 'add_env'
>>> ...
PyUtilib 4.7 was the last of the “distributed” versions of pyutilib – where the components (pyutilib.dev, pyutilib.workflow, etc) were installed as separate Python modules. By uninstalling PyUtilib 4.7, you only uninstalled the umbrella module that set the dependencies on all the sub-modules. The submodules from 4.7 are still installed, and they are now fighting with PyUtilib 5.x.
The solution is to uninstall *all*pyutilib.* modules (and all coopr.* modules) and then to reinstall Pyomo 4.x and PyUtilib 5.x (pulled automatically by dependency resolution when installing Pyomo). If you don’t want to do that uninstall manually, we provide a pyomo_uninstall.py script (https://software.sandia.gov/trac/pyomo/downloader/download/file/79) that will uninstall Pyomo 4.x, Coopr 3.x, PyUtilib 4.x and Pyutilib 5.x, and all the component modules.
john
--
...
It looks like you have a network connectivity issue. Are you sitting behind a proxy server? Worst case, you can grab the ZIP files that we publish and use pyomo_install to perform an offline installation. See the Installation Guide for more detail on this.
john
--