Comments (12)
It might be this logic...but it works for me.
I'll try it on a few machines.
try:
from landslide.generator import Generator
except ImportError:
from generator import Generator
I thought this would work for both working with a checkout and an pip install...
from landslide.
n1k0, it works fine for me on an ubuntu machine that's never seen a recent version of our code. I used pip.
from landslide.
I just created a new VM running latest Ubuntu (32bits), here's the complete log:
$ sudo pip install landslide
Downloading/unpacking landslide
Downloading landslide-0.4.0.tar.gz (51Kb): 51Kb downloaded
Running setup.py egg_info for package landslide
Traceback (most recent call last):
File "<string>", line 3, in <module>
ImportError: No module named setuptools.command
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 3, in <module>
ImportError: No module named setuptools.command
----------------------------------------
Command python setup.py egg_info failed with error code 1
Storing complete log in ./pip-log.txt
niko@ubuntu:~$ sudo apt-get install python-setuptools
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
python-setuptools
0 upgraded, 1 newly installed, 0 to remove and 200 not upgraded.
Need to get 213kB of archives.
After this operation, 922kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ lucid/main python-setuptools 0.6.10-4ubuntu1 [213kB]
Fetched 213kB in 0s (299kB/s)
Selecting previously deselected package python-setuptools.
(Reading database ... 124159 files and directories currently installed.)
Unpacking python-setuptools (from .../python-setuptools_0.6.10-4ubuntu1_all.deb) ...
Setting up python-setuptools (0.6.10-4ubuntu1) ...
Processing triggers for python-central ...
niko@ubuntu:~$ sudo pip install landslide
Downloading/unpacking landslide
Running setup.py egg_info for package landslide
Installing collected packages: landslide
Running setup.py install for landslide
changing mode of build/scripts-2.6/landslide from 644 to 755
changing mode of /usr/local/bin/landslide to 755
Successfully installed landslide
niko@ubuntu:~$ landslide
Traceback (most recent call last):
File "/usr/local/bin/landslide", line 23, in <module>
from generator import Generator
ImportError: No module named generator
from landslide.
Hmm ok. Thanks for doing that. It should also be installing markdown, jinja2, and pygments as requirements...
I'll keep investigating.
from landslide.
yes, and btw setuptools
seems to have a pretty useful install_required
method which distutils doesn't seem to have, I can see lot of python personas using it in their distributed packages...
from landslide.
I think I'm confusing setuptools and distutils...this is my first time to make a python package
from landslide.
(me too :D)
from landslide.
First i have no landslide installed, then i install it, then it works...
This is on my macbook.
○ python
Python 2.6.5 (r265:79063, May 17 2010, 13:48:52)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import landslide
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named landslide
>>> from landslide.generator import Generator
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named landslide.generator
>>>
○ sudo pip install landslide
Downloading/unpacking landslide
Downloading landslide-0.4.0.tar.gz (51Kb): 51Kb downloaded
Running setup.py egg_info for package landslide
Installing collected packages: landslide
Running setup.py install for landslide
changing mode of build/scripts-2.6/landslide from 644 to 755
changing mode of /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/landslide to 755
Successfully installed landslide
Cleaning up...
○ python
Python 2.6.5 (r265:79063, May 17 2010, 13:48:52)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import landslide
>>>
○ python
Python 2.6.5 (r265:79063, May 17 2010, 13:48:52)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from landslide.generator import Generator
>>> Generator
<class landslide.generator.Generator at 0x1017bce90>
>>>
○ landslide
Usage: landslide [options] input.md ...
Generates fancy HTML5 or PDF slideshows from Markdown sources
Options:
-h, --help show this help message and exit
-b, --debug Will display any exception trace to stdin
-d FILE, --destination=FILE
The path to the to the destination file: .html or .pdf
extensions allowed (default: presentation.html)
-e ENCODING, --encoding=ENCODING
The encoding of your files (defaults to utf8)
-i, --embed Embed base64-encoded images in presentation
-t FILE, --template=FILE
The path to a Jinja2 compatible template file
-o, --direct-ouput Prints the generated HTML code to stdin; won't work
with PDF export
-q, --quiet Won't write anything to stdin (silent mode)
-v, --verbose Write informational messages to stdin (enabled by
default)
Note: PDF export requires the `prince` program: http://princexml.com/
from landslide.
n1k0, can you put some debug statements in /usr/local/bin/landslide to see what that import logic is really going? It should be able to import the landslide module after install...
from landslide.
Actually this is weird:
$ landslide
Traceback (most recent call last):
File "/usr/local/bin/landslide", line 23, in <module>
from generator import Generator
ImportError: No module named generator
niko@ubuntu:~$ python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from landslide.generator import Generator
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.6/dist-packages/landslide/generator.py", line 23, in <module>
import jinja2
ImportError: No module named jinja2
(the jinja2
error is not related, but here the interactive python shell actually finds the module, whereas the executable doesn't)
My knowledge of python is not sufficient here... :/
from landslide.
okay this one being no more, I think you can safely mark it as closed
from landslide.
Yay :)
from landslide.
Related Issues (20)
- error: no such option: -m HOT 2
- Error: markdown() takes exactly 1 argument (2 given) HOT 8
- Creating a "title slide" leads to an RST syntax error
- Wish: Support for background images? HOT 1
- Wish: --paginate makes one html per page
- Error: path is on mount 'c:', start on mount 'D:' HOT 2
- Leapmotion leap.js seems to be gone HOT 4
- Automatic transitions HOT 1
- Mathjax improves and TOC issues. HOT 1
- How can I signature my name on the first slide? HOT 2
- reStructuredText slide-wide class/style
- "Here's an example." link in README.md seems dead HOT 5
- PDF conversion: support using weasyprint instead of PrinceXML
- look forward to supporting the Mermaid in the near future. HOT 2
- Fail to lauch--ImportError: cannot import name 'soft_unicode' from 'markupsafe' HOT 3
- Python v3.10? HOT 15
- default theme: does not work with browser history
- Works fine locally but not on Github Pages? HOT 2
- selectable aspect ratio HOT 2
- monospace block and bullets on the same slide HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from landslide.