Path: csiph.com!news.mixmin.net!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: jak Newsgroups: it.comp.lang.python Subject: Re: Pip on WinXp Date: Sun, 9 Jul 2023 18:22:54 +0200 Organization: A noiseless patient Spider Lines: 127 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sun, 9 Jul 2023 16:22:53 -0000 (UTC) Injection-Info: dont-email.me; posting-host="1ec770a02daaffbcf9c40f96e0040e50"; logging-data="2295054"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+6L3HpboGJOp6mn6bp8gkj" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 SeaMonkey/2.53.16 Cancel-Lock: sha1:sXn3dpYUBzkDj/y57WvGr2eXksM= In-Reply-To: Xref: csiph.com it.comp.lang.python:7856 News@tin.it.no ha scritto: > "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. > > Quindi ora funziona? Buono!