espressomd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ESPResSo-users] Python Interface


From: Rohit Goswami
Subject: Re: [ESPResSo-users] Python Interface
Date: Wed, 03 Jun 2015 03:38:32 +0530

Okay, sorry for the python misunderstanding,
So now there's yet another problem, on sucessfully installing and importing 
espresso;
thermostat seems undefined, (trying to run the example code at 
http://espressomd.org/wiki/Python_Interface )

Python 2.7.10 (default, May 26 2015, 04:16:29) 
[GCC 5.1.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import espresso
>>> import numpy
>>> system = espresso.System()
>>> system.time_step = 0.01
>>> system.skin = 0.4
>>> system.box_l = [10,10,10]
>>> espresso.thermostat.Thermostat().setLangevin(1.0,1.0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'thermostat'
>>> espressomd.thermostat.Thermostat().setLangevin(1.0,1.0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'espressomd' is not defined
>>> 



02.06.2015, 23:00, "address@hidden" <address@hidden>:
> Hey, thanks for the idea, but unfortunately in my case it builds from both  
> but gives the same error as before.
> In case it's relevant I'm not building with the default myconfig. I've 
> attached mine.
>
> 02.06.2015, 22:36, "Kai Szuttor" <address@hidden>:
>>  I just pulled from the master on git and checked compilation. I had a
>>  problem building the current master and found a missing
>>  field in a struct defined in the python interface, so i was not able to
>>  build. In my current master this bug is fixed and im able to build.
>>  Maybe your build was erroneous. So just clone from my repo and try:
>>  https://github.com/KaiSzuttor/espresso.git
>>
>>  Cheers
>>
>>  Kai Szuttor
>>
>>  On 06/02/2015 02:53 PM, address@hidden wrote:
>>>   The details are attached. I'm running an ArchLinux 64-bit system with 
>>> espresso compiled from the git source. With ./configure --with-python
>>>   The program compiles correctly however, on running ./pypresso and trying 
>>> to import espressomd;
>>>
>>>   Python 3.4.3 (default, Mar 25 2015, 17:13:50)
>>>   [GCC 4.9.2 20150304 (prerelease)] on linux
>>>   Type "help", "copyright", "credits" or "license" for more information.
>>>>>>   import espressomd
>>>   Traceback (most recent call last):
>>>     File "<stdin>", line 1, in <module>
>>>     File "/home/haozeke/Github/LabBom/espresso/espressomd/__init__.py", 
>>> line 32, in <module>
>>>       tcl = espressomd._tcl.TclInterpreter()
>>>     File "espressomd/_tcl.pyx", line 37, in 
>>> espressomd._tcl.TclInterpreter.__init__ (_tcl.cpp:654)
>>>       self.eval('global argv; set argv ""')
>>>     File "espressomd/_tcl.pyx", line 43, in 
>>> espressomd._tcl.TclInterpreter.eval (_tcl.cpp:745)
>>>       result = Tcl_Eval(self.interp, string)
>>>   TypeError: expected bytes, str found
>>>
>>>   Any help would be greatly appreciated.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]