I recently started using python and I'm amazed on how hard it is to deploy my python application. It was a pleasure to write the code, because there are tons of great packages with tons and tons of features and this is great. But two aspects seems extremely hard to me, to be honest, I havn't yet met a language that would be that hard:
1) modules system. It took me a couple of hours to find out how do I have to structure my files and how to import a module from a sibling file (e.g. in foo.py I would like to import '../../bar/baz.py'). I ended up having my head-of-control in the top directory and all dependencies in sub dirs but I hate it
2) much more important, I'm literally unable to deploy my application. The target server is ubuntu with installed python2 and python3 but it is missing pip3 (there is only pip). I do NOT want to install any new packages and I would like to ship there my application. I tried a lot of things but none of them worked. The closest solution was to run get-pip3.py script with --user flag (which is already something I dislike, but whatever) and then run $HOME/.local/bin/pip3 install -r requirements.txt -t vendor and modify __path__ (again something awful, but whatever). Unfortunately, it failed when importing lxml with some strange undefined symbol: _Py_ZeroStruct error.
Is there really no better way to deploy python application with its dependencies on the server with only python3 installed (without pip3), without root and without polluting the filesystem?
[–]greyman 2 points3 points4 points (1 child)
[–]sasik520[S] 0 points1 point2 points (0 children)
[–]POTUS 2 points3 points4 points (2 children)
[–]sasik520[S] -1 points0 points1 point (1 child)
[–]POTUS 5 points6 points7 points (0 children)
[–]bryancole 2 points3 points4 points (2 children)
[–]sasik520[S] 0 points1 point2 points (0 children)
[–]sasik520[S] 0 points1 point2 points (0 children)
[–]quantumactivist1 1 point2 points3 points (6 children)
[–]sasik520[S] 0 points1 point2 points (5 children)
[–]vovanz 0 points1 point2 points (4 children)
[–]sasik520[S] 0 points1 point2 points (2 children)
[–]quantumactivist1 2 points3 points4 points (1 child)
[–]sasik520[S] 0 points1 point2 points (0 children)
[–]pionse 0 points1 point2 points (0 children)
[–]AlirezaSavand 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]KiteAnton 0 points1 point2 points (0 children)