Showing posts with label python. Show all posts
Showing posts with label python. Show all posts

Tuesday, July 22, 2014

Python for .NET "import" fails

If you're using Python for .NET, and you have the following Python code:
import clr
import MyNETNamespace
and you get the error message:
ImportError: No module named MyNETNamespace
You should try two things:
  1. Make sure your .dll is named "MyNETNamespace.dll"
  2. Make sure all the .dll's that MyNETNamespace.dll is dependent on are in the directory, too. 

Saturday, June 01, 2013

Building Mercurial (hg) -- fatal error: Python.h: No such file or directory

The version of Mercurial you get using sudo apt-get install mercurial is a relatively old one. But, if you download it from http://mercurial.selenic.com/, you can get the latest. However, in a fresh install of Linux Mint, I got the following error when I tried to run sudo make install:
mercurial/base85.c:13:20: fatal error: Python.h: No such file or directory
compilation terminated.
To fix this, you need to install the python-dev package using:
sudo apt-get install python-dev
You'll need to install python-docutils, too. Then you can run make install.

Saturday, February 16, 2013

Installing python-markdown on Linux

I am running Lubuntu. I couldn't find these directions quickly using a google search, so maybe this will help someone else out in the future.

First, install python: sudo apt-get install python

Next, install "pip": sudo apt-get install python-pip

Now, for markdown: sudo pip install markdown

 To run it, use markdown_py input.md