Topic on Manual talk:Pywikibot

No module named pywikibot

15
KlosseBot (talkcontribs)

CMD writing no module named pywikibot when i start login.py

Xqt (talkcontribs)

Looks like your cmd has opened the "../core/scripts" path. You should start from parent "core" path and use the pwb.py wrapper script:

pwb.py login

2A00:1028:9192:FA72:F903:A911:3814:C073 (talkcontribs)

And when i write python pwb.py login it said no module named request.

Xqt (talkcontribs)

You have to install request module as a side package first. Read the message and do as proposed. The message is:

Python module 'requests' is required.

Try running 'pip install requests'

do it with the command

pip install requests

188.23.125.244 (talkcontribs)

I executed "pip install requests", it did so, but the same error doesn't go away. I tried both Python 3.6 and 2.7, it's the same with both.

Framawiki (talkcontribs)

Hello, can you type python pwb.py version and post here what you obtain ?

188.23.125.244 (talkcontribs)

This doesn't even work for me, as it gets an error in line 163 of pwb.py

Xqt (talkcontribs)

Did you installed requests for both python releases?

88.117.63.15 (talkcontribs)

I installed 2.7 after trying 3.6. I eventually got things to work after installing pip seperately again and then installing requests via "pip install requests" and restarting. I may have repeated this some times and can't pinpoint what got things to work, but i eventually got it to work.

KlosseBot (talkcontribs)

'pip install requests' doesnt work

Xqt (talkcontribs)

What is your python version? I propose using 2.7.9 or higher or 3.4 or higher release because the en:python package installer (pip) is shipped with these versions. Otherwise you have to install pip first.

KlosseBot (talkcontribs)

I have 3.4 but still it isnt pip in it. How do i install it?

Xqt (talkcontribs)

Maybe this could help.

JoKalliauer (talkcontribs)

I solved the issue using pip install pywikibot ~~~~

Xqt (talkcontribs)

This is always good enough if you have your own scripts based on pywikibot. If you want to use scripts shipped with pywikibot you have to clone/checkout the repository (either git or svn) or you can download the nightly from https://pywikibot.org. There are only some maintenance scripts which you can use if pywikibot is installed as a site-package like you did it. Refer https://doc.wikimedia.org/pywikibot/stable/utilities/scripts.html for the description.

Reply to "No module named pywikibot"