Can I install Python 3.x and 2.x on the same Windows computer?

来源:https://www.cnblogs.com/kungfupanda/archive/2020/04/14/12695460.html
-Advertisement-
Play Games

nstall both Python 2.7 and 3.4 with the windows installers. Go to C:\Python34 (the default install path) and change python.exe to python3.exe Edit you ...


  1. nstall both Python 2.7 and 3.4 with the windows installers.
  2. Go to C:\Python34 (the default install path) and change python.exe to python3.exe
  3. Edit your environment variables to include C:\Python27\;C:\Python27\Scripts\;C:\Python34\;C:\Python34\Scripts\;

 

 

https://datascience.com.co/how-to-install-python-2-7-and-3-6-in-windows-10-add-python-path-281e7eae62a

1. Download python 2.7

Go to www.python.org/downloads and click on ‘Download Python 2.714”.

Wait until installation package is complete.

2. Install python 2.7

When download is finished click to install. You need to select a destination directory where python files and executables will be located. In my case I chose “C:\Python27” as my directory.


Wait until install is complete.

Click Finish

3. Download python3

In the same way as described in step 1, download python3.

Click on executable to install and choose ‘Customize installation’.

Select default values and customize install location to C:\Python3

4. Add python27 and python3 PATH

Search ‘Panel de control’ and open it.

In the search bar, search for ‘variable de entorno’.

Click on ‘Variables de entorno’

Select PATH and click on ‘Nueva’

Add the following routes in order to use python and pip.

C:\Python27

C:\Python27\Scripts

C:\Python3

C:\Python3\Scripts

Note: If you have installed python on a different location you need to find your where python is and set that location.

5. Change executables names

In order to execute both python version change the python.exe to python2.exe where python2 is located and python.exe to python3.exe where python3 is located.

Source: https://stackoverflow.com/questions/3809314/how-to-install-both-python-2-x-and-python-3-x-in-windows-7

6. TEST Both Python versions

a. Check python versions

Run Python2 –V and Python3 –V to get respective python versions.

b. Install a package using python2 and python3

If the above commands run without problems python2 and python3 were successfully installed on windows 10 environment.

Jose Miguel Arrieta

January 2018


您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • js 的replace 預設替換隻替換第一個匹配的字元,如果字元串有超過兩個以上的對應字元就無法進行替換,這時候就要進行一點操作,進行全部替換。 ~~~ var str = "javascript"; console.log(str .replace("a","A"));//輸出:jAvascrip ...
  • 效果圖 列方法 調用 判斷 table 數據里有ID為479的嗎沒,有的話就標記該列為紅色 樣式 ...
  • antd 的Radio單選框 預設是左側顯示按鈕右側顯示文字,新的需求是按鈕在上方,文字在按鈕下方顯示. api上也沒有找到修改樣式的方法,就自己替換了樣式, const radioStyle ={ display:'flex', flexFlow:'column', alignItems:'cen ...
  • 第一步:下載pdf.js 下載地址:https://www.jsdelivr.com/package/npm/pdfjs-dist 打開後找到pdf.js、pdf.work.js以及cmaps路徑下的全部文件,下載到本地或者直接引用其地址 實例代碼 //HTML <canvas id="the-ca ...
  • 生命周期: 用通俗的語言來說,就是Vue中實例或者組件從創建到消滅中間經過的一系列過程。 beforecreate : 一般使用場景是在加 loading事件 的時候created :處於loading結束後,還做一些初始化,實現函數自執行(data數據已經初始化,但是DOM結構渲染完成,組件沒有加 ...
  • 模擬根據登錄情況判斷要顯示的歡迎界面 import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import App from './App'; import * ...
  • 一.原生js判斷元素是否隱藏 1.通過offsetParent判斷,使用這種方法來判斷當前元素是否被隱藏,包括通過設置父元素為 以及自己本身為 的情況。但是如果是通過設置 則無法檢測出。 2.通過getComputedStyle方式判斷 "getComputedStyle使用參考" ~~~ func ...
  • 參考借鑒ABP中提供的擴展性 持續更新.... ==實現一:== 定義一個介面 定義一個實現,這個實現是要被另外的一個實現類代替的: 替代的實現類: 這裡的 介面 特性都是ABP中的。 ==實現二:== 介面定義: 預設實現類: 替換類: ==實現三:== 參考: "擴展與解耦:Option模式與依 ...
一周排行
    -Advertisement-
    Play Games
  • 移動開發(一):使用.NET MAUI開發第一個安卓APP 對於工作多年的C#程式員來說,近來想嘗試開發一款安卓APP,考慮了很久最終選擇使用.NET MAUI這個微軟官方的框架來嘗試體驗開發安卓APP,畢竟是使用Visual Studio開發工具,使用起來也比較的順手,結合微軟官方的教程進行了安卓 ...
  • 前言 QuestPDF 是一個開源 .NET 庫,用於生成 PDF 文檔。使用了C# Fluent API方式可簡化開發、減少錯誤並提高工作效率。利用它可以輕鬆生成 PDF 報告、發票、導出文件等。 項目介紹 QuestPDF 是一個革命性的開源 .NET 庫,它徹底改變了我們生成 PDF 文檔的方 ...
  • 項目地址 項目後端地址: https://github.com/ZyPLJ/ZYTteeHole 項目前端頁面地址: ZyPLJ/TreeHoleVue (github.com) https://github.com/ZyPLJ/TreeHoleVue 目前項目測試訪問地址: http://tree ...
  • 話不多說,直接開乾 一.下載 1.官方鏈接下載: https://www.microsoft.com/zh-cn/sql-server/sql-server-downloads 2.在下載目錄中找到下麵這個小的安裝包 SQL2022-SSEI-Dev.exe,運行開始下載SQL server; 二. ...
  • 前言 隨著物聯網(IoT)技術的迅猛發展,MQTT(消息隊列遙測傳輸)協議憑藉其輕量級和高效性,已成為眾多物聯網應用的首選通信標準。 MQTTnet 作為一個高性能的 .NET 開源庫,為 .NET 平臺上的 MQTT 客戶端與伺服器開發提供了強大的支持。 本文將全面介紹 MQTTnet 的核心功能 ...
  • Serilog支持多種接收器用於日誌存儲,增強器用於添加屬性,LogContext管理動態屬性,支持多種輸出格式包括純文本、JSON及ExpressionTemplate。還提供了自定義格式化選項,適用於不同需求。 ...
  • 目錄簡介獲取 HTML 文檔解析 HTML 文檔測試參考文章 簡介 動態內容網站使用 JavaScript 腳本動態檢索和渲染數據,爬取信息時需要模擬瀏覽器行為,否則獲取到的源碼基本是空的。 本文使用的爬取步驟如下: 使用 Selenium 獲取渲染後的 HTML 文檔 使用 HtmlAgility ...
  • 1.前言 什麼是熱更新 游戲或者軟體更新時,無需重新下載客戶端進行安裝,而是在應用程式啟動的情況下,在內部進行資源或者代碼更新 Unity目前常用熱更新解決方案 HybridCLR,Xlua,ILRuntime等 Unity目前常用資源管理解決方案 AssetBundles,Addressable, ...
  • 本文章主要是在C# ASP.NET Core Web API框架實現向手機發送驗證碼簡訊功能。這裡我選擇是一個互億無線簡訊驗證碼平臺,其實像阿裡雲,騰訊雲上面也可以。 首先我們先去 互億無線 https://www.ihuyi.com/api/sms.html 去註冊一個賬號 註冊完成賬號後,它會送 ...
  • 通過以下方式可以高效,並保證數據同步的可靠性 1.API設計 使用RESTful設計,確保API端點明確,並使用適當的HTTP方法(如POST用於創建,PUT用於更新)。 設計清晰的請求和響應模型,以確保客戶端能夠理解預期格式。 2.數據驗證 在伺服器端進行嚴格的數據驗證,確保接收到的數據符合預期格 ...