Hi,
I had used pywikibot for years, but in the past years I didn't use it. Now, I would like to use it again on Windows7, therefore I downloaded the code from here: https://github.com/wikimedia/pywikibot-core using TortoiseSVN, and installed Python 2.7.5. I use the last version of these. I set the path for Python27, pywikipedia and pywikibot folders as PATH system variable. I have my own user-config.py file. I followed the instruction on https://www.mediawiki.org/wiki/Manual:Pywikipediabot/Windows
As I want to run login.py, I get this message: Traceback (most recent call last): File "C:\Program Files\pywikipedia\pywikibot\login.py", line 15, in <module> import pywikibot ImportError: No module named pywikibot
I got similar error for other scripts: import module --> ImportError: No module named ...
Could you please help me, how could I solve this problem?
Thanks in advance.
Best regards, Samat
The simplest way is to run pwb.py from the root of the framework. So, if you got the code in c:\pywikibot-core and pywikibot in c:\pywikibot-core\pywikibot, you'd have something like:
c:\pywikibot-core> python pwb.py pywikibot\login.py
or, in general,
c:\pywikibot-core> python pwb.py c:\path\to\your\script.py
as pwb.py solves all the path-related issues.
You can also try to install pywikibot as a python library, with "python setup.py install", but I'm not sure if and how this works on Windows. If the install is successful, you should be able to import pywikibot from anywhere. After each update from git, you need to install the script again.
2013/10/19 Samat samat78@gmail.com:
Hi,
I had used pywikibot for years, but in the past years I didn't use it. Now, I would like to use it again on Windows7, therefore I downloaded the code from here: https://github.com/wikimedia/pywikibot-core using TortoiseSVN, and installed Python 2.7.5. I use the last version of these. I set the path for Python27, pywikipedia and pywikibot folders as PATH system variable. I have my own user-config.py file. I followed the instruction on https://www.mediawiki.org/wiki/Manual:Pywikipediabot/Windows
As I want to run login.py, I get this message: Traceback (most recent call last): File "C:\Program Files\pywikipedia\pywikibot\login.py", line 15, in
<module> import pywikibot ImportError: No module named pywikibot
I got similar error for other scripts: import module --> ImportError: No module named ...
Could you please help me, how could I solve this problem?
Thanks in advance.
Best regards, Samat
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Brave new world! I liked the old days when it was just simple to use Pywiki. No reinstall after each update, no 100-mile-long commands.
2013/10/19 Strainu strainu10@gmail.com
The simplest way is to run pwb.py from the root of the framework. So, if you got the code in c:\pywikibot-core and pywikibot in c:\pywikibot-core\pywikibot, you'd have something like:
c:\pywikibot-core> python pwb.py pywikibot\login.py
or, in general,
c:\pywikibot-core> python pwb.py c:\path\to\your\script.py
as pwb.py solves all the path-related issues.
You can also try to install pywikibot as a python library, with "python setup.py install", but I'm not sure if and how this works on Windows. If the install is successful, you should be able to import pywikibot from anywhere. After each update from git, you need to install the script again.
2013/10/19 Samat samat78@gmail.com:
Hi,
I had used pywikibot for years, but in the past years I didn't use it. Now, I would like to use it again on Windows7, therefore I downloaded the code from here: https://github.com/wikimedia/pywikibot-core using TortoiseSVN, and installed Python 2.7.5. I use the last version of these. I set the path for Python27, pywikipedia and pywikibot folders as PATH system variable. I have my own user-config.py file. I followed the instruction on https://www.mediawiki.org/wiki/Manual:Pywikipediabot/Windows
As I want to run login.py, I get this message: Traceback (most recent call last): File "C:\Program Files\pywikipedia\pywikibot\login.py", line 15, in
<module> import pywikibot ImportError: No module named pywikibot
I got similar error for other scripts: import module --> ImportError: No module named ...
Could you please help me, how could I solve this problem?
Thanks in advance.
Best regards, Samat
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Hi Strainu,
Thanks for your answer!
I have tried your advice, but it is still not perfect.
c:\Program Files\pywikipedia>python pwb.py pywikibot\login.py Traceback (most recent call last): File "pwb.py", line 104, in <module> run_python_file(fn, args) File "pwb.py", line 49, in run_python_file exec compile(source, filename, "exec") in main_mod.__dict__ File "pywikibot\login.py", line 15, in <module> import pywikibot File "c:\Program Files\pywikipedia\pywikibot__init__.py", line 308, in <module> from page import Page, ImagePage, Category, Link, User, ItemPage, PropertyPage, Claim File "c:\Program Files\pywikipedia\pywikibot\page.py", line 16, in <module> import pywikibot.site File "c:\Program Files\pywikipedia\pywikibot\site.py", line 33, in <module> from pywikibot.data import api File "c:\Program Files\pywikipedia\pywikibot\data\api.py", line 13, in <module> from pywikibot.comms import http File "c:\Program Files\pywikipedia\pywikibot\comms\http.py", line 30, in <module> from httplib2 import SSLHandshakeError ImportError: No module named httplib2
How should I do? :(
Samat
ps. to Bináris: you are right, old version was more (beginner) user friendly :)
On Sat, Oct 19, 2013 at 3:29 PM, Strainu strainu10@gmail.com wrote:
The simplest way is to run pwb.py from the root of the framework. So, if you got the code in c:\pywikibot-core and pywikibot in c:\pywikibot-core\pywikibot, you'd have something like:
c:\pywikibot-core> python pwb.py pywikibot\login.py
or, in general,
c:\pywikibot-core> python pwb.py c:\path\to\your\script.py
as pwb.py solves all the path-related issues.
You can also try to install pywikibot as a python library, with "python setup.py install", but I'm not sure if and how this works on Windows. If the install is successful, you should be able to import pywikibot from anywhere. After each update from git, you need to install the script again.
2013/10/19 Samat samat78@gmail.com:
Hi,
I had used pywikibot for years, but in the past years I didn't use it. Now, I would like to use it again on Windows7, therefore I downloaded the code from here: https://github.com/wikimedia/pywikibot-core using TortoiseSVN, and installed Python 2.7.5. I use the last version of these. I set the path for Python27, pywikipedia and pywikibot folders as PATH system variable. I have my own user-config.py file. I followed the instruction on https://www.mediawiki.org/wiki/Manual:Pywikipediabot/Windows
As I want to run login.py, I get this message: Traceback (most recent call last): File "C:\Program Files\pywikipedia\pywikibot\login.py", line 15, in
<module> import pywikibot ImportError: No module named pywikibot
I got similar error for other scripts: import module --> ImportError: No module named ...
Could you please help me, how could I solve this problem?
Thanks in advance.
Best regards, Samat
you need to install httlib2 for running core
if you're more comfortable with older versions you can use "compat" instead of core, I bet you are more familiar with it
Best
On 10/19/13, Samat samat78@gmail.com wrote:
Hi Strainu,
Thanks for your answer!
I have tried your advice, but it is still not perfect.
c:\Program Files\pywikipedia>python pwb.py pywikibot\login.py Traceback (most recent call last): File "pwb.py", line 104, in <module> run_python_file(fn, args) File "pwb.py", line 49, in run_python_file exec compile(source, filename, "exec") in main_mod.__dict__ File "pywikibot\login.py", line 15, in <module> import pywikibot File "c:\Program Files\pywikipedia\pywikibot__init__.py", line 308, in
<module> from page import Page, ImagePage, Category, Link, User, ItemPage, PropertyPage, Claim File "c:\Program Files\pywikipedia\pywikibot\page.py", line 16, in <module> import pywikibot.site File "c:\Program Files\pywikipedia\pywikibot\site.py", line 33, in <module> from pywikibot.data import api File "c:\Program Files\pywikipedia\pywikibot\data\api.py", line 13, in <module> from pywikibot.comms import http File "c:\Program Files\pywikipedia\pywikibot\comms\http.py", line 30, in <module> from httplib2 import SSLHandshakeError ImportError: No module named httplib2
How should I do? :(
Samat
ps. to Bináris: you are right, old version was more (beginner) user friendly :)
On Sat, Oct 19, 2013 at 3:29 PM, Strainu strainu10@gmail.com wrote:
The simplest way is to run pwb.py from the root of the framework. So, if you got the code in c:\pywikibot-core and pywikibot in c:\pywikibot-core\pywikibot, you'd have something like:
c:\pywikibot-core> python pwb.py pywikibot\login.py
or, in general,
c:\pywikibot-core> python pwb.py c:\path\to\your\script.py
as pwb.py solves all the path-related issues.
You can also try to install pywikibot as a python library, with "python setup.py install", but I'm not sure if and how this works on Windows. If the install is successful, you should be able to import pywikibot from anywhere. After each update from git, you need to install the script again.
2013/10/19 Samat samat78@gmail.com:
Hi,
I had used pywikibot for years, but in the past years I didn't use it. Now, I would like to use it again on Windows7, therefore I downloaded the code from here: https://github.com/wikimedia/pywikibot-core using TortoiseSVN, and installed Python 2.7.5. I use the last version of these. I set the path for Python27, pywikipedia and pywikibot folders as PATH system variable. I have my own user-config.py file. I followed the instruction on https://www.mediawiki.org/wiki/Manual:Pywikipediabot/Windows
As I want to run login.py, I get this message: Traceback (most recent call last): File "C:\Program Files\pywikipedia\pywikibot\login.py", line 15, in
<module> import pywikibot ImportError: No module named pywikibot
I got similar error for other scripts: import module --> ImportError: No module named ...
Could you please help me, how could I solve this problem?
Thanks in advance.
Best regards, Samat
Hi Amir,
Compat version looks working for me.
Thx!
Samat
On Sat, Oct 19, 2013 at 4:40 PM, Amir Ladsgroup ladsgroup@gmail.com wrote:
you need to install httlib2 for running core
if you're more comfortable with older versions you can use "compat" instead of core, I bet you are more familiar with it
Best
On 10/19/13, Samat samat78@gmail.com wrote:
Hi Strainu,
Thanks for your answer!
I have tried your advice, but it is still not perfect.
c:\Program Files\pywikipedia>python pwb.py pywikibot\login.py Traceback (most recent call last): File "pwb.py", line 104, in <module> run_python_file(fn, args) File "pwb.py", line 49, in run_python_file exec compile(source, filename, "exec") in main_mod.__dict__ File "pywikibot\login.py", line 15, in <module> import pywikibot File "c:\Program Files\pywikipedia\pywikibot__init__.py", line 308, in
<module> from page import Page, ImagePage, Category, Link, User, ItemPage, PropertyPage, Claim File "c:\Program Files\pywikipedia\pywikibot\page.py", line 16, in <module> import pywikibot.site File "c:\Program Files\pywikipedia\pywikibot\site.py", line 33, in <module> from pywikibot.data import api File "c:\Program Files\pywikipedia\pywikibot\data\api.py", line 13, in <module> from pywikibot.comms import http File "c:\Program Files\pywikipedia\pywikibot\comms\http.py", line 30,
in
<module> from httplib2 import SSLHandshakeError ImportError: No module named httplib2
How should I do? :(
Samat
ps. to Bináris: you are right, old version was more (beginner) user friendly :)
On Sat, Oct 19, 2013 at 3:29 PM, Strainu strainu10@gmail.com wrote:
The simplest way is to run pwb.py from the root of the framework. So, if you got the code in c:\pywikibot-core and pywikibot in c:\pywikibot-core\pywikibot, you'd have something like:
c:\pywikibot-core> python pwb.py pywikibot\login.py
or, in general,
c:\pywikibot-core> python pwb.py c:\path\to\your\script.py
as pwb.py solves all the path-related issues.
You can also try to install pywikibot as a python library, with "python setup.py install", but I'm not sure if and how this works on Windows. If the install is successful, you should be able to import pywikibot from anywhere. After each update from git, you need to install the script again.
2013/10/19 Samat samat78@gmail.com:
Hi,
I had used pywikibot for years, but in the past years I didn't use it. Now, I would like to use it again on Windows7, therefore I downloaded the code from here: https://github.com/wikimedia/pywikibot-core using TortoiseSVN, and installed Python 2.7.5. I use the last version of these. I set the path for Python27, pywikipedia and pywikibot folders as PATH system variable. I have my own user-config.py file. I followed the instruction on https://www.mediawiki.org/wiki/Manual:Pywikipediabot/Windows
As I want to run login.py, I get this message: Traceback (most recent call last): File "C:\Program Files\pywikipedia\pywikibot\login.py", line 15, in
<module> import pywikibot ImportError: No module named pywikibot
I got similar error for other scripts: import module --> ImportError: No module named ...
Could you please help me, how could I solve this problem?
Thanks in advance.
Best regards, Samat
-- Amir
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Samat, where did you get your core bot? Did you download the nightly dump? Or did you fetch is from git or from github and if the last one as svn repository?
xqt
----- Original Nachricht ---- Von: Samat samat78@gmail.com An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 19.10.2013 15:48 Betreff: Re: [Pywikipedia-l] import module --> ImportError: No module named ...
Hi Strainu,
Thanks for your answer!
I have tried your advice, but it is still not perfect.
c:\Program Files\pywikipedia>python pwb.py pywikibot\login.py Traceback (most recent call last): File "pwb.py", line 104, in <module> run_python_file(fn, args) File "pwb.py", line 49, in run_python_file exec compile(source, filename, "exec") in main_mod.__dict__ File "pywikibot\login.py", line 15, in <module> import pywikibot File "c:\Program Files\pywikipedia\pywikibot__init__.py", line 308, in
<module> from page import Page, ImagePage, Category, Link, User, ItemPage, PropertyPage, Claim File "c:\Program Files\pywikipedia\pywikibot\page.py", line 16, in <module> import pywikibot.site File "c:\Program Files\pywikipedia\pywikibot\site.py", line 33, in <module> from pywikibot.data import api File "c:\Program Files\pywikipedia\pywikibot\data\api.py", line 13, in <module> from pywikibot.comms import http File "c:\Program Files\pywikipedia\pywikibot\comms\http.py", line 30, in <module> from httplib2 import SSLHandshakeError ImportError: No module named httplib2
How should I do? :(
Samat
ps. to Bináris: you are right, old version was more (beginner) user friendly :)
On Sat, Oct 19, 2013 at 3:29 PM, Strainu strainu10@gmail.com wrote:
The simplest way is to run pwb.py from the root of the framework. So, if you got the code in c:\pywikibot-core and pywikibot in c:\pywikibot-core\pywikibot, you'd have something like:
c:\pywikibot-core> python pwb.py pywikibot\login.py
or, in general,
c:\pywikibot-core> python pwb.py c:\path\to\your\script.py
as pwb.py solves all the path-related issues.
You can also try to install pywikibot as a python library, with "python setup.py install", but I'm not sure if and how this works on Windows. If the install is successful, you should be able to import pywikibot from anywhere. After each update from git, you need to install the script again.
2013/10/19 Samat samat78@gmail.com:
Hi,
I had used pywikibot for years, but in the past years I didn't use it. Now, I would like to use it again on Windows7, therefore I downloaded
the
code from here: https://github.com/wikimedia/pywikibot-core using TortoiseSVN, and installed Python 2.7.5. I use the last version of
these.
I set the path for Python27, pywikipedia and pywikibot folders as PATH system variable. I have my own user-config.py file. I followed the instruction on https://www.mediawiki.org/wiki/Manual:Pywikipediabot/Windows
As I want to run login.py, I get this message: Traceback (most recent call last): File "C:\Program Files\pywikipedia\pywikibot\login.py", line 15, in
<module> import pywikibot ImportError: No module named pywikibot
I got similar error for other scripts: import module --> ImportError:
No
module named ...
Could you please help me, how could I solve this problem?
Thanks in advance.
Best regards, Samat
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l