1

I am trying to use the pydna module on a machine running Ubuntu 14.04, and am getting the following error when I try to import it:

  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/pydna/__init__.py", line 97, in <module>
    from pydna.amplify                                  import Anneal
  File "/usr/local/lib/python2.7/dist-packages/pydna/amplify.py", line 32, in <module>
    from pydna.dsdna                    import rc
  File "/usr/local/lib/python2.7/dist-packages/pydna/dsdna.py", line 63, in <module>
    from IPython.display import Markdown as display
ImportError: cannot import name Markdown

Has anyone found a way to resolve this? I have tried reinstalling IPython, and pydna. The offending chunk in dsdna.py is the following: (lines 58-63)

try:
    import IPython
except ImportError:
    def display(item): return item
else:
    from IPython.display import Markdown as display

Any help would be greatly appreciated!

(Python 2.7.6)

1
  • Is markdown installed? pip install markdown or so? Commented Mar 8, 2016 at 15:53

1 Answer 1

1

I have the IPython 4.1.1 installed and it works for me (see below). Which version do you have? Also, which pydna version did you install?

This could be due to a too old version of IPython, recently IPython was split into IPython and Jupyter which caused some code to break.

(bjorn)bjorn@bjorn-ThinkPad-T450s:~/Desktop/GMB$ python
Python 2.7.10 |Anaconda 2.5.0 (64-bit)| (default, Oct 19 2015, 18:04:42) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> from IPython.display import Markdown as display
>>> import IPython
>>> IPython.__version__
'4.1.1'
Sign up to request clarification or add additional context in comments.

1 Comment

I had pydna1.0.0, and ipython1.4; updating ipython got things working, thanks so much!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.