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

How to install dotnet via python pip




dotnet - Python Interoperability with the Microsoft .NET Framework, it belongs to Classifiers:

- Topic :: Software Development :: Compilers
- Topic :: Software Development :: Quality Assurance
- Topic :: System

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



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_dotnet_env

- Active the virtual environment

test_dotnet_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_dotnet_env

- Active the virtual environment

source test_dotnet_env/bin/active


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

To install dotnet on Windows(CMD):

py -m pip install dotnet

To install dotnet on Unix/macOs:

pip install dotnet


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

Example:

pip install dotnet==1.1.7


Please see the version list below table:

VersionReleased dateCommand
dotnet 1.4.22021-10-31T08:01:25Windows:

py -m pip install dotnet==1.4.2

Unix/macOs:

pip install dotnet==1.4.2

dotnet 1.3.12017-06-29T23:18:05Windows:

py -m pip install dotnet==1.3.1

Unix/macOs:

pip install dotnet==1.3.1

dotnet 1.2.22017-06-10T15:26:00Windows:

py -m pip install dotnet==1.2.2

Unix/macOs:

pip install dotnet==1.2.2

dotnet 1.2.12016-09-03T19:54:15Windows:

py -m pip install dotnet==1.2.1

Unix/macOs:

pip install dotnet==1.2.1

dotnet 1.1.92016-07-07T19:55:12Windows:

py -m pip install dotnet==1.1.9

Unix/macOs:

pip install dotnet==1.1.9

dotnet 1.1.72016-06-06T00:53:47Windows:

py -m pip install dotnet==1.1.7

Unix/macOs:

pip install dotnet==1.1.7


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

Download the distribution file from dotnet-1.4.2-cp39-cp39-win_amd64.whl or the specific dotnet version in the below list of distribution

After that, install by command:

On Windows(CMD):

py -m pip install <path_to_dotnet_downloaded_file>

On Unix/macOs:

pip install <path_to_dotnet_downloaded_file>


List distribution:

- dotnet-1.1.9-cp27-cp27m-win32.whl
- dotnet-1.1.9-cp27-cp27m-win_amd64.whl
- dotnet-1.1.9-cp35-cp35m-win32.whl
- dotnet-1.1.9-cp35-cp35m-win_amd64.whl
- dotnet-1.2.1-cp27-cp27m-win32.whl
- dotnet-1.2.1-cp27-cp27m-win_amd64.whl
- dotnet-1.2.1-cp35-cp35m-win32.whl
- dotnet-1.2.1-cp35-cp35m-win_amd64.whl
- dotnet-1.2.2-cp36-cp36m-win_amd64.whl
- dotnet-1.3.1-cp27-cp27m-win_amd64.whl
- dotnet-1.3.1-cp36-cp36m-win_amd64.whl
- dotnet-1.4.2-cp39-cp39-win_amd64.whl


Project link:

- Homepage