Closed akdhjvf closed 5 years ago
You may have installed slugify for python 2 and not 3:
pip2 install python-slugify
python2 -c "import slugify"
python2 ./configupdater.py
pip3 install python-slugify
python3 -c "import slugify"
python3 ./configupdater.py
make sure that both your python and pip points to the same version. For example:
$ python --version
Python 2.7.15rc1
$ pip --version
pip 9.0.1 from /usr/lib/python2.7/dist-packages (python 2.7)
$ python3 --version
Python 3.6.7
$ pip3 --version
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)
Here you can see my default python is python2
My default python is python3 and never installed python2. I checked that both my python and pip points to the same version. I installed slugify by typing "pip install python-slugify" in the terminal, and it seems like python cannot find the module in my mac. I tried to check sys.path and copy the slugify folder into one of the path, but the error still occurs.
This is strange, what about the other modules? For example:
python -c "import tensorflow"
or
python -c "import numpy"
Are you using a python virtualenv?
Looks like this is a common issue on OSX. Can you check this? https://paulcunningham.me/installing-python-modules-correct-python-version-mac/
I followed the blog and my slugify seemed reloaded, but the error still occured. Am I supposed to right-click the configupdater.py and run with python launcher? This is my first time to use python, and I am so sorry for asking this dumb question.
In shell "import slugify" and "from slugify import slugify" are normal and no error occurred after I followed the blog
I see, Normally you should get the same thing running:
$ python
>>> import slugify
>>>
and
$ python -c "import slugify"
and
$ python ./myscript.py
where myscript.py can be a simple file like this:
import slugify
Do you get an any error with one of these?
The first two are fine with no error. The terminal returns (null): can't open file './myscript.py': [Errno 2] No such file or directory when I tried the last one. I saved myscript.py into documents folder.
When I manually opened myscript.py with python launcher the same error occured: ImportError: No module named slugify
The first error happens because you're not in the right directory. You can either:
myscript.py
is and right-click, and choose 'open in a terminal' (or similar)cd /path/to/the/script
for example if the script is in ~/Documents/:
cd ~/Documents/
python ./myscript.py
you can also directly run:
python ~/Documents/myscript.py
Thank you very much! ConfigUpdater.py and RunAll.py are perfectly fine now when I run them in terminal using "python ~/path/to/the/file. One more question though, after I finished running ConfigUpdater.py, no config.ini appeared, and will RunAll.py run forever? those data seemed endless.
I'm not sure exactly where the config.ini is generated in the case the working directory is not the same than the script directory. I would suggest to instead go to the correct directory and run python ./script.py
RunAll.py will run all scripts one by one. As explained in the readme, if you have a basic API-key and want to download too many games, it will takes age.
Last time I tested it, with my developer key, it took 3-4 days just to download 3 patches of challenger+master+diamond games
Thank you! ;D
I used python 3.7.3 to run configupdater.py and this error popped up. I followed the instruction and installed python-slugify, please help!