[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ESPResSo-users] Python Interface
From: |
Axel Arnold |
Subject: |
Re: [ESPResSo-users] Python Interface |
Date: |
Tue, 2 Jun 2015 20:32:23 +0200 |
Hi!
Pierre is correct, ESPResSo is not Python3-compatible. The error you see comes
from the fact that string constants in Python3 are Unicode, which Tcl_eval
doesn't eat. There should be a b before the string to make it a byte string,
but a short grep for print makes me doubt the rest of the code is python3...
Would be good if the build process refuses python3...
Axel
> Am 02.06.2015 um 19:23 schrieb Pierre de Buyl <address@hidden>:
>
> Is espresso compatible with Python 3 (just asking but the submitter has
> "Python
> 3.4.3").
>
> Pierre
>
>> On Tue, Jun 02, 2015 at 07:06:40PM +0200, Kai Szuttor wrote:
>> 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.
>
>