1. 程式人生 > 其它 >Pycharm 提示:this license * has been cancelled - Python零基礎入門教程

Pycharm 提示:this license * has been cancelled - Python零基礎入門教程

目錄

一.前言

零基礎 Python 學習路線推薦 : Python 學習目錄 >> Python 基礎入門

Pycharm 安裝啟用過程中,提示 this license **** has been cancelled 。這個問題並不是你的啟用碼不對,而是需要修改系統的 hosts 檔案,下面詳細講解下如何修改 hosts 檔案。

一.找到 hosts 檔案

1.找到 hosts 檔案所在目錄:(以 windoes 為例,其他平臺操作類似)

Windows:C:\Windows\System32\drivers\etc\hosts

Linux:/etc/hosts

Mac:/etc/hosts

2.hosts 檔案並沒有字尾,直接是沒有辦法修改的。因為記事本只能開啟 txt,推薦下載任意一款程式碼編輯器,推薦使用 NotePad++,使用比較簡單,並且支援多種語言。

如果擔心檔案修改出錯,可以先複製一份作為備份,然後用滑鼠右鍵選擇 edit with NotePad++ 或者開啟 notepad++之後,直接把 hosts 檔案拖到 notepad++裡面也一樣,這樣我們便能看到 hosts 檔案的具體內容:

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#	127.0.0.1       localhost
#	::1             localhost

二.修改 hosts 檔案

如果想 Pycharm 能正常使用,我們需要在 hosts 檔案的內容的末尾在新增一行程式碼:0.0.0.0 account.jetbrains.com,注意程式碼中間的空格,一個字元都不能錯,如果擔心寫錯,請直接複製下面的程式碼,然後貼上到檔案中,修改之後記得儲存。

0.0.0.0 account.jetbrains.com

三.檢查 hosts 檔案是否修改成功

很多小夥伴說修改了,但是還是報錯 this license **** has been cancelled !在步驟完成之後,請使用 notepad++ 重新開啟檢查 hosts 檔案,是否最後一行程式碼新增成功,如果沒有 this 0.0.0.0 account.jetbrains.com,只能說明你沒有修改成功。

有時候可能是 C 盤許可權問題,你可以直接複製一份 hosts 檔案到桌面,修改好之後,再拷貝回去,直接覆蓋原始的 hosts 檔案即可,這種方法最簡單(推薦)

不管是第一次安裝還是以後再次出現這種問題,你只需要記住:this license ** has been cancelled 這個錯誤 99.99%都跟你的 hosts 檔案有關係。**

四.pycharm 安裝啟用詳細教程

Pycharm 安裝啟用詳細教程請參考:python 開發環境配置

五.猜你喜歡

  1. Python 簡介
  2. Python Pycharm Anacanda 區別
  3. Python2.x 和 Python3.x,如何選擇?
  4. Python 配置環境
  5. Python Hello World 入門

未經允許不得轉載:猿說程式設計 » Pycharm 提示:this license **** has been cancelled

本文由部落格 - 猿說程式設計 猿說程式設計 釋出!