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

How to install units via python pip




units - Python support for quantities with units, it belongs to Classifiers:

- Intended Audience :: System Administrators
- License :: OSI Approved :: Python Software Foundation License
- Topic :: Utilities

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



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_units_env

- Active the virtual environment

test_units_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_units_env

- Active the virtual environment

source test_units_env/bin/active


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

To install units on Windows(CMD):

py -m pip install units

To install units on Unix/macOs:

pip install units


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

Example:

pip install units==0.00


Please see the version list below table:

VersionReleased dateCommand
units 0.072017-02-05T05:34:50Windows:

py -m pip install units==0.07

Unix/macOs:

pip install units==0.07

units 0.062013-02-25T00:49:37Windows:

py -m pip install units==0.06

Unix/macOs:

pip install units==0.06

units 0.052012-10-27T17:49:25Windows:

py -m pip install units==0.05

Unix/macOs:

pip install units==0.05

units 0.042010-08-06T07:03:14Windows:

py -m pip install units==0.04

Unix/macOs:

pip install units==0.04

units 0.032009-10-31T21:03:41Windows:

py -m pip install units==0.03

Unix/macOs:

pip install units==0.03

units 0.022009-08-17T18:59:28Windows:

py -m pip install units==0.02

Unix/macOs:

pip install units==0.02

units 0.012009-08-17T04:44:16Windows:

py -m pip install units==0.01

Unix/macOs:

pip install units==0.01

units 0.002009-08-17T04:40:43Windows:

py -m pip install units==0.00

Unix/macOs:

pip install units==0.00


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

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

After that, install by command:

On Windows(CMD):

py -m pip install <path_to_units_downloaded_file>

On Unix/macOs:

pip install <path_to_units_downloaded_file>


List distribution:


Project link:

- Homepage