Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy
 

How to install RestrictedPython via python pip




RestrictedPython - RestrictedPython is a defined subset of the Python language which allows to provide a program input into a trusted environment., it belongs to Classifiers:

- Development Status :: 6 - Mature
- License :: OSI Approved :: Zope Public License
- Programming Language :: Python :: 2
- Programming Language :: Python :: 2.7
- Programming Language :: Python :: 3.1
- Programming Language :: Python :: 3.5
- Programming Language :: Python :: 3.6
- Programming Language :: Python :: 3.7
- Programming Language :: Python :: 3.8
- Programming Language :: Python :: 3.9
- Programming Language :: Python :: 3.10
- Programming Language :: Python :: Implementation
- Programming Language :: Python :: Implementation :: CPython
- Topic :: Security

When you know about this project and you want to new install RestrictedPython to support your project or you get trouble as ModuleNotFoundError: No module named "RestrictedPython" or ImportError: cannot import name "RestrictedPython" in your project, let follow this tutorial to install RestrictedPython



Installation:

Step 1: First, ensure you installed pip in your os, to check pip has been installed on your computer

In Windows (CMD):

py -m pip --version

In Unix/macOS:

python3 -m pip --version

Ensure pip, setuptools, and wheel are up to date:

In Windows (CMD):

py -m pip install --upgrade pip setuptools wheel

In Unix/macOS:

python3 -m pip install --upgrade pip setuptools wheel


Optional - If you want to install in virtual environment:

In Windows (CMD):

- Install virtualenv - if you installed it, please ignore

py -m pip install --user virtualenv

- Create a virtual environment

py -m venv test_RestrictedPython_env

- Active the virtual environment

test_RestrictedPython_env\Scripts\active

In Unix/macOS:

- Install virtualenv - if you installed it, please ignore

pip3 install virtualenv

- Create a virtual environment

python3 -m venv test_RestrictedPython_env

- Active the virtual environment

source test_RestrictedPython_env/bin/active


Step 2: OK, now, let flow below content to start the installation RestrictedPython

To install RestrictedPython on Windows(CMD):

py -m pip install RestrictedPython

To install RestrictedPython on Unix/macOs:

pip install RestrictedPython


Step 3: If you want to install a specific RestrictedPython version, add ==<RestrictedPython version> to the end command line

Example:

pip install RestrictedPython==3.4.2


Please see the version list below table:

VersionReleased dateCommand
RestrictedPython 5.22021-11-19T13:20:28Windows:

py -m pip install RestrictedPython==5.2

Unix/macOs:

pip install RestrictedPython==5.2

RestrictedPython 5.12020-10-07T12:19:35Windows:

py -m pip install RestrictedPython==5.1

Unix/macOs:

pip install RestrictedPython==5.1

RestrictedPython 5.02019-09-03T06:16:39Windows:

py -m pip install RestrictedPython==5.0

Unix/macOs:

pip install RestrictedPython==5.0

RestrictedPython 4.02019-05-10T09:49:48Windows:

py -m pip install RestrictedPython==4.0

Unix/macOs:

pip install RestrictedPython==4.0

RestrictedPython 3.6.02010-07-09T17:10:42Windows:

py -m pip install RestrictedPython==3.6.0

Unix/macOs:

pip install RestrictedPython==3.6.0

RestrictedPython 3.5.22010-04-30T17:09:29Windows:

py -m pip install RestrictedPython==3.5.2

Unix/macOs:

pip install RestrictedPython==3.5.2

RestrictedPython 3.5.12009-03-17T16:48:21Windows:

py -m pip install RestrictedPython==3.5.1

Unix/macOs:

pip install RestrictedPython==3.5.1

RestrictedPython 3.5.02009-02-09T18:34:19Windows:

py -m pip install RestrictedPython==3.5.0

Unix/macOs:

pip install RestrictedPython==3.5.0

RestrictedPython 3.4.32008-10-26T05:41:48Windows:

py -m pip install RestrictedPython==3.4.3

Unix/macOs:

pip install RestrictedPython==3.4.3

RestrictedPython 3.4.22007-07-28T09:59:29Windows:

py -m pip install RestrictedPython==3.4.2

Unix/macOs:

pip install RestrictedPython==3.4.2


Step 4: Otherwise, you can install RestrictedPython from local archives:

Download the distribution file from RestrictedPython-5.2.tar.gz or the specific RestrictedPython version in the below list of distribution

After that, install by command:

On Windows(CMD):

py -m pip install <path_to_RestrictedPython_downloaded_file>

On Unix/macOs:

pip install <path_to_RestrictedPython_downloaded_file>


List distribution:


Project link:

- Homepage
- Documentation
- Source
- Tracker