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
  • 示例項目結構 在 Visual Studio 中創建一個 WinForms 應用程式後,項目結構如下所示: MyWinFormsApp/ │ ├───Properties/ │ └───Settings.settings │ ├───bin/ │ ├───Debug/ │ └───Release/ ...
  • [STAThread] 特性用於需要與 COM 組件交互的應用程式,尤其是依賴單線程模型(如 Windows Forms 應用程式)的組件。在 STA 模式下,線程擁有自己的消息迴圈,這對於處理用戶界面和某些 COM 組件是必要的。 [STAThread] static void Main(stri ...
  • 在WinForm中使用全局異常捕獲處理 在WinForm應用程式中,全局異常捕獲是確保程式穩定性的關鍵。通過在Program類的Main方法中設置全局異常處理,可以有效地捕獲並處理未預見的異常,從而避免程式崩潰。 註冊全局異常事件 [STAThread] static void Main() { / ...
  • 前言 給大家推薦一款開源的 Winform 控制項庫,可以幫助我們開發更加美觀、漂亮的 WinForm 界面。 項目介紹 SunnyUI.NET 是一個基於 .NET Framework 4.0+、.NET 6、.NET 7 和 .NET 8 的 WinForm 開源控制項庫,同時也提供了工具類庫、擴展 ...
  • 說明 該文章是屬於OverallAuth2.0系列文章,每周更新一篇該系列文章(從0到1完成系統開發)。 該系統文章,我會儘量說的非常詳細,做到不管新手、老手都能看懂。 說明:OverallAuth2.0 是一個簡單、易懂、功能強大的許可權+可視化流程管理系統。 有興趣的朋友,請關註我吧(*^▽^*) ...
  • 一、下載安裝 1.下載git 必須先下載並安裝git,再TortoiseGit下載安裝 git安裝參考教程:https://blog.csdn.net/mukes/article/details/115693833 2.TortoiseGit下載與安裝 TortoiseGit,Git客戶端,32/6 ...
  • 前言 在項目開發過程中,理解數據結構和演算法如同掌握蓋房子的秘訣。演算法不僅能幫助我們編寫高效、優質的代碼,還能解決項目中遇到的各種難題。 給大家推薦一個支持C#的開源免費、新手友好的數據結構與演算法入門教程:Hello演算法。 項目介紹 《Hello Algo》是一本開源免費、新手友好的數據結構與演算法入門 ...
  • 1.生成單個Proto.bat內容 @rem Copyright 2016, Google Inc. @rem All rights reserved. @rem @rem Redistribution and use in source and binary forms, with or with ...
  • 一:背景 1. 講故事 前段時間有位朋友找到我,說他的窗體程式在客戶這邊出現了卡死,讓我幫忙看下怎麼回事?dump也生成了,既然有dump了那就上 windbg 分析吧。 二:WinDbg 分析 1. 為什麼會卡死 窗體程式的卡死,入口門檻很低,後續往下分析就不一定了,不管怎麼說先用 !clrsta ...
  • 前言 人工智慧時代,人臉識別技術已成為安全驗證、身份識別和用戶交互的關鍵工具。 給大家推薦一款.NET 開源提供了強大的人臉識別 API,工具不僅易於集成,還具備高效處理能力。 本文將介紹一款如何利用這些API,為我們的項目添加智能識別的亮點。 項目介紹 GitHub 上擁有 1.2k 星標的 C# ...