How can i install a package?

Posted by wuerger on 2018-04-12 01:38

I have installed Active Python 3.5.4 on Windows 10 x64.

I have upgraded the pip package by typing

python -m pip install -U pip

I have installed the package "whois" by typing

pip3 install whois

I have created a file "whois.py" with the content:

import whois

When i execute the whois.py file, a window opens and is asking me for a file "ActivePython-3.5.4.3504-win64-x64-404899.exe.msi".

I don't have that file and i can't find on the ActivePython download page. There is only an exe file to download. MSI files are unavailable.

So i am unable to install the package.

Please what am i doing wrong?
How can i install the package?

Thank you!

AttachmentSize
activepython_moduleinstall.png33.22 KB
activepython_moduleinstall_whois.png18.85 KB

grahams
ActiveState Staff
Fri, 2018-04-13 09:48

Don't upgrade the pip that comes with ActivePython. The pip code will not build successfully on Windows out of the box, so upgrading pip will break it. If you need to upgrade pip, you're best to wait until a newer version of ActivePython becomes available.

wuerger | Sat, 2018-04-14 17:13

I did the pip upgrade according to the help page which is shipped with Active Python:
\Python35\Doc\pkg\pip\index.html

grahams
ActiveState Staff
Tue, 2018-04-17 09:05

https://pip.pypa.io/en/stable/installing/

A problem with all reference documentation is that like Perl and Tcl, Python docs are heavily Linux-centric since a large majority of the developer base is on Linux.

Also, pip was not designed for Windows.*

If you use that command, three new .exe files will appear in the Scripts folder.
- First, this is faulty design, and is asking for troubles with Sysadmins and Windows security. Executables do not belong in a scripts folder.
- Second, the naive pip update script blows away two required Python scripts that fix problems with the environment.
- Third, exe files load with a higher priority than batch files if both are found in the same folder. That prevents the existing batch files for pip from ensuring that the PYTHONLIB variable is loaded before pip is called.

You're going to get a broken implementation of pip if you use the upstream upgrade command.

* Proof that pip was not designed for Windows:
If pip had been built for Windows from the ground up, this zero-day design bug would never have appeared. (From the links in the footnotes of the pip documentation)
https://github.com/pypa/pip/issues/1299