Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login

POZE MRRRR'S FORUM (VIEW ONLY)

Nu sunteti logat.
Nou pe simpatie:
swiss_virginia
Femeie
25 ani
Cluj
cauta Barbat
27 - 54 ani
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides / [WINDOWS] How to Install Python and Pip, then Packages with Pip Moderat de TRaP, TonyTzu
Autor
Mesaj Pagini: 1
Mrrrr
AdMiN

Inregistrat: acum 17 ani
Postari: 2228
In order to be able to read statistical data from the CORDEX library, I need to install a python script package called py-cordex.

In order to install that, first I have to install Python with Pip, then the py-cordex package.

1. Download the latest version of Python from here:

2. Start the executable and install, but make sure Pip is selected, and press Next then check Add Python to environment variables (doing this will skip you steps

By default, Python installs in: %USERPROFILE%\AppData\Local\Programs\Python\Python311\

3. Do not open Python, instead open the Command Prompt (cmd)

4. Type the following line specifying your path to the py-cordex-0.4.1.tar.gz file (you might have a different version) (or you can use command from source 1 straight in the directory where you saved py-cordex-0.4.1.tar.gz)

py -m pip install "D:\NetCDF\py-cordex-0.4.1.tar.gz"

5. Wait for the installation to finish

Py-cordex will be installed under the Python install directory, usually in: %USERPROFILE%\AppData\Local\Programs\Python\Python311\Lib\site-packages\py_cordex-0.4.1.dist-info

The installation might show some errors about script location and the fact that it has not been added to PATH:

WARNING: The scripts pip.exe, pip3.11.exe and pip3.exe are installed in 'C:\Users\n0nam\AppData\Local\Programs\Python\Python311\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.


6. Add them to PATH in your Environment Variables (This PC properties - Advanced System Settings - Environment Variables - the field at the top) (source 3+4)

7. Close CMD and then reopen it and type the following and press enter:

py


If that command opens Microsoft Store, use the Windows search bar to find "Manage app execution aliases". There should be two aliases for Python. Unselect them, and this will allow the usual Python aliases "python" and "python3". (source 2)

8. Restart CMD and type again the command from 7. Itshould show something like:

Python 3.11.2 (tags/v3.11.2:878ead1, Feb  7 2023, 16:38:35) [MSC v.1934 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>


9. Also type the following two commands to confirm both Python and Pip are working as they should:

py --version

and

pip --version


10. If pip --version doesn't work, start the executable from 2 again, choose Modify, pip should already be checked, click Next and check Add Python to environment variables (who know this could be done at 2?  :rolleyes:  ), then click Install.

Check the pip --version command again.



Source 1:
Source 2:
Source 3:
Source 4:


_______________________________________


pus acum 1 an
   
Pagini: 1  

Mergi la