[Distutils] "ImportError: No module named mkdocs" but I can import it

Wichert Akkerman wichert at wiggy.net
Sat Jun 7 01:31:41 CEST 2014


On 06 Jun 2014, at 21:30, edbrannin at gmail.com wrote:
> When I run "python setup.py install", it installs the mkdocs module to lib/site-packages/mkdocs and I can import it from a Python shell, but when I run the "mkdocs" command I get this error:
> 
> C:\>mkdocs
> Traceback (most recent call last):
>   File "C:\Python27\Scripts\mkdocs-script.py", line 9, in <module>
>     load_entry_point('mkdocs==0.9', 'console_scripts', 'mkdocs')()
>   File "C:\Python27\lib\site-packages\distribute-0.6.34-py2.7.egg\pkg_resources.py", line 343, in load_entry_point
>     return get_distribution(dist).load_entry_point(group, name)
>   File "C:\Python27\lib\site-packages\distribute-0.6.34-py2.7.egg\pkg_resources.py", line 2307, in load_entry_point
>     return ep.load()
>   File "C:\Python27\lib\site-packages\distribute-0.6.34-py2.7.egg\pkg_resources.py", line 2013, in load
>     entry = __import__(self.module_name, globals(),globals(), ['__name__'])
> ImportError: No module named mkdocs
> 
> 
mkdocs/mkdocs is not a .py file. Try renaming that to mkdocs/mkdocs.py . Your import test did not try to import the exact same thing as the console script uses: that uses mkdocs.mkdocs.main_entry_point, and you only tried to import the upper mkdocs package.

Wichert.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20140607/dc7f357d/attachment-0001.html>


More information about the Distutils-SIG mailing list