How to Get Started with Pretzel: Your Modern Jupyter Alternative

Feb 26, 2023 | Programming

If you’ve been using Jupyter and are looking for a robust alternative that incorporates AI capabilities, then Pretzel might just be the tool for you! Let’s dive into how you can easily switch to and utilize this powerful software to enhance your coding experience.

What is Pretzel?

Pretzel is a modern, open-source fork of Jupyter that comes loaded with features aimed at improving your coding capabilities, particularly with its AI code generation and editing functionalities. Think of it as upgrading from a trusty bicycle (Jupyter) to a high-speed electric bike (Pretzel)—same comfortable ride but with a powerful boost to get you where you’re going faster!

Quick Start

  • Installation: Use pip to install Pretzel with the command: pip install pretzelai. Once installed, run pretzel lab to open the web interface.
  • Free Hosted Version: Alternatively, you can use the FREE hosted version at pretzelai.app.
  • Inline Tab Completions: Simply start typing in a cell to get instant inline tab completions, making coding smoother and faster.
  • Engage with AI: Click on “Ask AI” or use the shortcut Cmd+K (Mac) or Ctrl+K (Linux/Windows) to ask the AI for help with code generation or editing.
  • AI Sidebar: Use the AI Sidebar (shortcut: Ctrl+Cmd+B for Mac and Ctrl+Alt+B for Linux/Windows) for an interactive experience where you can chat and generate code.

Running in a Docker Container

If you’re facing issues with installation, especially on Windows, using Docker might be the solution. Here’s how to set it up:

  1. Create a Dockerfile with the following content:
  2. FROM python:3.9-slim
    RUN apt-get update && apt-get install -y build-essential gcc && rm -rf /var/lib/apt/lists/*
    WORKDIR /root/pretzel
    RUN pip install pretzelai
    EXPOSE 8888
    CMD ["pretzel", "lab", "--ip=0.0.0.0", "--allow-root", "--notebook-dir=/root/pretzel", "--ServerApp.allow_remote_access=True", "--ServerApp.token=", "--no-browser"]
  3. Build the Docker image: docker build -t pretzel .
  4. Run Pretzel using: docker run --name pretzel -p 8888:8888 pretzel
  5. Access it via http://localhost:8888/lab.

Troubleshooting Installation Problems

If you encounter errors during installation, like “Failed to build installable wheels for some pyproject.toml-based projects,” it could mean you’re missing essential build tools.

  • For Windows: Install Microsoft Build Tools here.
  • For Ubuntu/Debian: Use the command sudo apt-get update && sudo apt-get install build-essential python3-dev in your terminal.
  • For macOS: Install gcc using brew install gcc and if necessary, run xcode-select --install.

For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

Utilizing Pretzel’s AI Features

With Pretzel, engaging with AI is exceptionally straightforward. Here’s how you can leverage its features effectively:

  • Start by typing in a cell to trigger inline tab completions.
  • For generating and editing code, use Cmd+K or Ctrl+K to open the AI prompt textbox.
  • The AI sidebar provides options to generate code or even request explanations about existing code, making it akin to a digital coding partner.

Conclusion

Shifting from Jupyter to Pretzel not only enhances your coding productivity but also offers numerous advanced features that cater to your needs as a developer.

At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Feedback and Support

If you encounter issues, have feedback, or encounter bugs, feel free to report them on the GitHub issues page.

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox