You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to install required dependencies? (not a python user here) #252
I'd say that there are other requirements too (will edit wiki once I manage to complete the process)
sudo easy_install pip
sudo pip install kitchen
sudo pip install requests
python dumpgenerator.py --api=___SOME___URL___HERE --xml
Please install the kitchen module.
Please install or update the Requests module.
I thought I've just installed the required packages? (I've also restarted my terminal)
When at first I tried without sudo there were some path permissions errors.
This is the first time in year when I'm using anything related to python other than SimpleHTTPServer... And I believe than your 5 minute of effort can save me a lot of time (I'd rather focus on my wiki, rather than solving some dependencies jigsaw - I was never good at it)
Are you able to load those packages from other scripts? You can see if those packages are accessible when you open the interactive Python in the terminal and try to import those packages.
Do the following steps if you are unclear:
Open your Terminal
Type "python" to open the interactive Python interface
Type "import kitchen".
If the above fails, it is likely that it is an issue with your system.
Are you able to load those packages from other scripts? You can see if
those packages are accessible when you open the interactive Python in the
terminal and try to import those packages.
Do the following steps if you are unclear:
Open your Terminal
Type "python" to open the interactive Python interface
Type "import kitchen".
If the above fails, it is likely that it is an issue with your system.
—
Reply to this email directly or view it on GitHub #252 (comment).
@stefek99 you seem to do same mistakes as me when I was at point 0 of learning curve.
python works much better with virtualenv so make it installed
sudo apt-get install virtualenv
then make some place where you put your dumpgenerator
cd
mkdir whateverwikiyouwanttoarchivename
cd whateverwikiyouwanttoarchivename
then make inside that directory virtualenvironment, named e.g. venv (think of it is directory with bunch of python things just to make your project safely work)
virtualenv venv --no-site-packages
note that --no-site-packages above -- it will make your life much easier as it will create full replica of python (not big, don't worry) and you won't have conflicts between system-wide python packages (e.g. via sudo apt-get instal ... or sudo pip install ...). Just forget for sudo pip ... altogether now.
now switch to your environment
source venv/bin/activate
or
(that's dot instead of keyword source)
. venv/bin/activate
you will see your command prompt switch to something like
(venv)username@host:~/path$
you did NOT launch any new shell, just rehashed some settings, so do NOT press on Ctrl+D to leave it, rather use keyword deactivate when you've done everything
now you are very close - just pip install everything you need as dependency
it should work now, at least you should not get python error stacks
path permission errors were because you didn't make that virtual environment (directory which we named venv just to have some handle), so pip has been trying to put it where system-wide python located, and it bumped into acls not allowing you to do so. When you added sudo, it basically forced installation into system-wide place. But it can create bunch of other problems, from future updates to conflict resolutions in version updates to package cache problems and few else. And when you fired dumpgenerator, the python interpreter didn't have proper environment, so it didn't see packages
Reacted by James T, Suriyaa Sundararuban and tonlam
Activity
Hydriz commentedon Sep 22, 2015
Are you able to load those packages from other scripts? You can see if those packages are accessible when you open the interactive Python in the terminal and try to import those packages.
Do the following steps if you are unclear:
If the above fails, it is likely that it is an issue with your system.
emijrp commentedon Sep 22, 2015
Why do we use kitchen? Is it a recently added dependence?
2015-09-22 8:53 GMT+02:00 Hydriz Scholz notifications@github.com:
nemobis commentedon Sep 22, 2015
Emilio J. Rodríguez-Posada, 22/09/2015 11:31:
It was added some time ago to reduce Unicode errors.
silpol commentedon Sep 22, 2015
@stefek99 you seem to do same mistakes as me when I was at point 0 of learning curve.
source venv/bin/activateor
(that's dot instead of keyword source)
. venv/bin/activateyou did NOT launch any new shell, just rehashed some settings, so do NOT press on Ctrl+D to leave it, rather use keyword deactivate when you've done everything
(note no sudo fired in progress)
marsitatheultra commentedon Oct 5, 2015
Thank you.
Next time I do the backup I'll follow instructions from here.
Hydriz commentedon Oct 7, 2015
Added a link to this task, thanks for your help @silpol!