Last modified: Jun 14, 2026

Install Socketify.py in Python

Socketify.py is a powerful Python library for building high-performance web applications. It is built on top of uvicorn and asyncio, offering fast HTTP and WebSocket support. In this guide, you will learn how to install Socketify.py correctly on your system.

Prerequisites Before Installation

Before installing Socketify.py, ensure you have Python 3.8 or newer. Check your Python version with this command:

python --version

If Python is not installed, download it from the official website. Also, ensure pip is available. Verify pip with:

pip --version

Install Socketify.py with pip

The simplest way to install Socketify.py is using pip. Open your terminal or command prompt and run:

pip install socketify

This command downloads the latest stable version from PyPI. If you are on Linux or macOS, you might need to use pip3:

pip3 install socketify

After installation, verify it worked by importing the library in Python:

import socketify
print("Socketify.py installed successfully!")

Expected output:

Socketify.py installed successfully!

Install in a Virtual Environment

Using a virtual environment is a best practice. It isolates your project dependencies. Create and activate a virtual environment:

python -m venv myenv
source myenv/bin/activate  # On macOS/Linux
myenv\Scripts\activate     # On Windows

Now install Socketify.py inside the environment:

pip install socketify

This keeps your global Python clean and avoids conflicts with other projects.

Install Specific Version

Sometimes you need a specific version for compatibility. Use pip install socketify==version. For example, to install version 0.3.0:

pip install socketify==0.3.0

Check available versions with:

pip index versions socketify

Install from Source (GitHub)

If you want the latest development version, install directly from the GitHub repository. First, clone the repo:

git clone https://github.com/cirospaciari/socketify.py.git
cd socketify.py

Then install it in development mode:

pip install -e .

This allows you to test unreleased features.

Troubleshooting Common Errors

Error: pip: command not found

This means pip is not installed. Install it with:

python -m ensurepip --upgrade

Error: No module named 'socketify'

Even after installation, this error appears if you are in the wrong environment. Ensure your virtual environment is activated. Also, check if you installed it globally but are using a different Python interpreter.

Permission Denied on Linux/macOS

If you get permission errors, use --user flag:

pip install --user socketify

Or run with sudo (not recommended for security):

sudo pip install socketify

Build Errors on Windows

Socketify.py requires a C++ compiler on Windows. Install Microsoft C++ Build Tools from the official site. Alternatively, use a precompiled wheel by upgrading pip:

pip install --upgrade pip wheel
pip install socketify

Test Your Installation

Create a simple example to confirm everything works. Write a basic server in a file app.py:

import socketify

app = socketify.App()

@app.get("/")
def home(req, res):
    res.send("Hello, Socketify!")

app.listen(3000, lambda: print("Server running on http://localhost:3000"))
app.run()

Run the server:

python app.py

Open your browser at http://localhost:3000. You should see "Hello, Socketify!". If you see this, the installation is successful.

Uninstall Socketify.py

If you need to remove it, use pip:

pip uninstall socketify

Confirm the removal when prompted.

Conclusion

Installing Socketify.py is straightforward with pip. Always use a virtual environment to avoid dependency issues. If you encounter errors, check your Python version, compiler tools, or try installing from source. Now you are ready to build fast web apps with Socketify.py. For more advanced usage, explore the official documentation and start coding.