Importing Yade in other Python applications
Hi, I have a problem with importing Yade in other Python applications. The Yade documentation provides the easiest way to import the Yade in other Python applications. I try the provided method to create a symbolic link as explained below.
=======
$ cd /home/zhaorong/
$ ln -s /home/zhaorong/
=======
Then, I tried in Python2 and it succeeded.
=======
zhaorong@
Python 2.7.16 (default, Oct 7 2019, 17:36:04)
[GCC 8.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path.
>>> from yadeimport import *
=======
But when I used the same method in python3, it failed.
=======
zhaorong@
Python 3.7.3 (default, Oct 7 2019, 12:56:13)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path.
>>> from yadeimport import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/
print 'Yade version: %s%s'%(
SyntaxError: invalid syntax
=======
I want to know whether the Yade is imported to Python2 applications only, not Python3 applications.
Thanks.
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Rong Zhao for more information if necessary.