Path: csiph.com!news.mixmin.net!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "News@tin.it.no" Newsgroups: it.comp.lang.python Subject: Re: Pip on WinXp Date: Thu, 6 Jul 2023 08:50:59 +0200 Organization: A noiseless patient Spider Lines: 124 Message-ID: References: Injection-Date: Thu, 6 Jul 2023 06:52:06 -0000 (UTC) Injection-Info: dont-email.me; posting-host="64159ba3b32f45cf87c7ea521ea529d8"; logging-data="907772"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18JaevzXmNx4TiVX3so5ghawQS8VX+/fOM=" Cancel-Lock: sha1:C/m+P5CK5w0k6UUVfQC2rBylCoM= X-Newsreader: Microsoft Outlook Express 6.00.3790.3959 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4913 X-Priority: 3 X-RFC2646: Format=Flowed; Response X-MSMail-Priority: Normal Xref: csiph.com it.comp.lang.python:7855 "jak" ha scritto nel messaggio news:u14l5m$2ni7v$1@dont-email.me... > News@tin.it.no ha scritto: >> Salve a tutti >> >> Ho installato Python 3.4 su un pc con WinXp, da console digito: >> pip --version ma compare questo errore: >> Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 >> bit >> tel)] on win32 >> Type "help", "copyright", "credits" or "license" for more information. >>>>> pip --version >> Traceback (most recent call last): >> File "", line 1, in >> NameError: name 'pip' is not defined >>>>> >> >> C:\Programmi\Python\Scripts\pip3.4.exe >> C:\Programmi\Python\Scripts\pip3.exe >> C:\Programmi\Python\Scripts\pip.exe >> >> Cosa devo fare per risolvere questo errore? >> >> Grazie a tutti >> >> Ciao >> >> >> > mmmh... c'è poco su cui lavorare quindi provo solo a dare qualche > consiglio: > - accertati di avere una sola versione di python installata. > non ricordo se il cmd di winXP ha già il comando 'where', se si da 'cmd' > puoi utilizzare il comando 'where python' che, se non lo interrompi > dovrebbe elencarti i programmi python.(exe/com/bat/cmd) che hai sul > sistema. > - oppure se hai installato anche il launcher di python (py), sempre da > 'cmd', lancialo con il parametro -0 (trattino zero) e dovrebbe elencarti > le versioni di python che hai sul sistema: > py -0 C:\WINDOWS\system32>py -0 Requested Python version (0) not installed > - se hai più di una versione installata, accertati che nella variabile > PATH sia la cartella della versione 3.4 si trovi elencata prima delle > altre. PATH=D:\Programmi\Python\Scripts > - accertati che ora il comando pip funzioni C:\WINDOWS\system32>pip Usage: pip [options] Commands: install Install packages. uninstall Uninstall packages. freeze Output installed packages in requirements format. list List installed packages. show Show information about installed packages. search Search PyPI for packages. wheel Build wheels from your requirements. zip DEPRECATED. Zip individual packages. unzip DEPRECATED. Unzip individual packages. help Show help for commands. General Options: -h, --help Show help. --isolated Run pip in an isolated mode, ignoring environment variables and user configuration. -v, --verbose Give more output. Option is additive, and can be used up to 3 times. -V, --version Show version and exit. -q, --quiet Give less output. --log Path to a verbose appending log. --proxy Specify a proxy in the form [user:passwd@]proxy.server:port. --retries Maximum number of retries each connection should attempt (default 5 times). --timeout Set the socket timeout (default 15 seconds). --exists-action Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup. --trusted-host Mark this host as trusted, even though it does not have valid or any HTTPS. --cert Path to alternate CA bundle. --client-cert Path to SSL client certificate, a single file containing the private key and the certificate in PEM format. --cache-dir Store the cache data in . --no-cache-dir Disable the cache. --disable-pip-version-check Don't periodically check PyPI to determine whether a new version of pip is available for download. Implied with --no-index. > - a questo punto aggiorna python. Per questo io mi sono scritto un > piccolo batch in un file .bat da lanciare. Questo è il contenuto: > @echo off > echo. > for /F "tokens=1,* delims== " %%a in ('2^>NUL py -m pip list -o --format > columns ^|^ > find /V "Package " ^| find /V " --------"') do py -m pip install -U %%a > > Ovviamente se 'pip' non ti funziona questo è inutile. > - L'alternativa è disinstallare python, pulire manualmente la certella > di installazione e ritentare l'installazione. Poni attenzione al fatto > che se hai anche tentato un'installazione limitata all'utente potresti > avere dei rimasugli da cancellare anche nella cartella > %USERPROFILE%\Appdata > Ora come ora non mi viene in mente nient'altro da suggerire.