Page MenuHomePhabricator

Improve user message asking for package to be installed
Closed, DuplicatePublic

Description

After Downloading Python 3.5 and the latest nightly build from http://tools.wmflabs.org/pywikibot/ I tried to follow https://www.mediawiki.org/wiki/Manual:Pywikibot/Installation#Configuring_Pywikibot

I did

> cd C:\Users\Jonatan\Desktop\pywikibot\core
> pwb.py login

and got this result back

ImportError: No module named 'requests'
Python module requests is required.
Try running 'pip install requests'.

'pip install requests' doesnt work by default on Windows on Python 3.5

Instead instruct the user to do python -m pip install requests

(and the same for all other pip instructions)

An alternative is to just do the install for the user. At least on Windows.

Event Timeline

jayvdb subscribed.

We need to document on that page that requests needs to be installed, by running:

pip install requests
jayvdb triaged this task as Lowest priority.May 7 2016, 1:04 AM
jayvdb added a project: good first task.

How do I do that?

C:\Users\Jonatan\Desktop\pywikibot\core>pip install requests
'pip' is not recognized as an internal or external command,
operable program or batch file.

Does this work on Windows with Python 3.5?

python -m pip install requests

https://docs.python.org/3/installing/

>cd C:\Users\Jonatan\AppData\Local\Programs\Python\Python35-32

>python -m pip install requests
Collecting requests
  Downloading requests-2.10.0-py2.py3-none-any.whl (506kB)
    100% |################################| 507kB 169kB/s
Installing collected packages: requests
Successfully installed requests-2.10.0
You are using pip version 7.1.2, however version 8.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

> python -m pip install --upgrade pip
Collecting pip
  Downloading pip-8.1.1-py2.py3-none-any.whl (1.2MB)
    100% |################################| 1.2MB 88kB/s
Installing collected packages: pip
  Found existing installation: pip 7.1.2
    Uninstalling pip-7.1.2:
      Successfully uninstalled pip-7.1.2
Successfully installed pip-8.1.1
> cd C:\Users\Jonatan\Desktop\pywikibot\core
> peb.py login
NOTE: 'user-config.py' was not found!

etc. So it seems like that did it..

jayvdb renamed this task from ImportError: No module named 'requests' to Improve user message asking for package to be installed.May 7 2016, 1:41 AM
jayvdb raised the priority of this task from Lowest to High.
jayvdb updated the task description. (Show Details)