To ensure a smooth onboarding experience with femtoAI tools and SDKs, developers should be familiar with the basics of Python environments and package management. This guide provides a brief overview of the concepts and tools required.


1. Common CLI Commands

Distributors should be comfortable navigating the terminal or command line interface (CLI), as many SDK tools are CLI-based.

Basics

  • Navigate directories:
  cd /path/to/directory
  • List files:
  ls      # Unix/macOS
  dir     # Windows
  • Check current directory:
  pwd     # Unix/macOS
  • Make a new directory:
  mkdir new-folder
  • Run a Python script:
  python script.py

Helpful Tips

  • Use the --help flag to see options for most commands:
  python script.py --help

πŸ“š Learn more: Linux Command Line Basics (by freeCodeCamp)


2. Python Environments

Python environments help isolate project dependencies to avoid conflicts between different tools and libraries. At femtoAI, we recommend using conda for environment management.

Using Conda

  • Create a new environment:
  conda create -n femto-env python=3.10
  • Activate the environment:
  conda activate femto-env
  • Install packages inside the environment:
  pip install -r requirements.txt
  • Deactivate when done:
  conda deactivate

Best Practices

  • Create a new conda environment for each project or version of the SDK.
  • Always activate your environment before running scripts or installing packages.

πŸ“š Learn more: Conda User Guide


2b. Understanding Folder Structure for Conda Environments

When using Conda (or Anaconda), environments and packages are typically stored in predefined directories. Understanding where these are located can help you keep your setup organized.

Default Folder Locations

  • Anaconda Installation Folder: This is where the base Anaconda system is installed. Example:
    • Windows: C:/Users/YourName/Anaconda3
    • macOS/Linux: /Users/YourName/anaconda3 or /home/username/anaconda3
  • Environments Folder:
    • By default, new environments are stored inside envs/ within the Anaconda folder:
      • Example: C:/Users/YourName/Anaconda3/envs/femto-env
  • Your Project Folder: This is where your actual project files (scripts, SDK, model files, etc.) live. This can be anywhere you choose, like:
    • C:/Users/YourName/Documents/femtoAI_project
    • /home/username/projects/femtoAI_project

Folder Tree Example

C:/Users/YourName/
β”œβ”€β”€ Anaconda3/
β”‚   β”œβ”€β”€ envs/
β”‚   β”‚   └── femto-env/
β”‚   └── pkgs/
β”œβ”€β”€ Documents/
β”‚   └── femtoAI_project/
β”‚       β”œβ”€β”€ script.py
β”‚       └── requirements.txt

Tips

  • You do not need to move your project files into the Anaconda folder.
  • Just activate the correct Conda environment in your terminal before working in your project folder:
conda activate femto-env 
cd ~/Documents/femtoAI_project

πŸ“š Learn more: Managing Environments in Conda


3. Python Package Management

Python uses package managers to install and manage libraries or tools (known as packages). At femtoAI, you’ll be working with Python packages for interacting with our SDK, tooling, and possibly for running inference workflows.

Key Concepts

  • pip: The standard Python package installer. Example:
  pip install femtocrux
  • requirements.txt: A file listing required packages and versions.
    To install all dependencies for a project, cd into the project directory with a requirements.txt then run the following command:
  pip install -r requirements.txt
  • PyPI: The Python Package Index, the default source for pip packages.
  • Editable installs: Used for development. If working with a cloned repo:
  pip install -e .

Tips

  • Always ensure pip is up to date:
  pip install --upgrade pip
  • Use version pinning (==) in requirements to ensure compatibility.

πŸ“š Learn more: pip Documentation


Summary

Before using femtoAI tools:

  • Be comfortable setting up and using conda environments.
  • Know how to install Python packages with pip.
  • Be fluent in common command line tasks to navigate and execute scripts.

This foundation ensures that developers can successfully run examples, use the SDK, and integrate femtoAI capabilities into their workflows.

For detailed installation steps, refer to the femtoAI SDK documentation.


Need help? Contact your femtoAI technical point of contact or tech-support@femto.ai

Get updates

Be the first to know about new products and features
PDPA Icon

Notice
This website stores cookies on your computer. These cookies, as specified in our Privacy Policy, are used to collect information about how you interact with our website. We use this information in order to improve and customize your browsing experiences.

Use the β€œAccept” button to consent to the use of such technologies. Use the β€œReject” button to continue without accepting.

Privacy Preferences

We and selected third parties use cookies or similar technologies to store cookies on your computer for technical purposes and, with your consent, for other purposes such as website analytics.

Allow All
Manage Consent Preferences
  • Strictly necessary cookies
    Always Active

    These trackers are used for activities that are strictly necessary to operate or deliver the service you requested from us and, therefore, do not require you to consent.

  • Analytical / performance cookies

    These trackers help us to measure traffic and analyze your behavior with the goal of improving our service.

Save