Closed headwinds closed 9 years ago
I'd recommend that you follow the installation guide to make sure things work correctly. It seems like you are working from source so use this one. This will install mypq into the correct location on your system.
Alternately, you could use pip install mpyq to install mpyq separately or install mpyq from source using a process similar to the one outlined for sc2reader in the link above.
Actually, I got the same issue as @headwinds in #157. I solved it as @GraylinKim says: I installed mypq separately with pip then I retried installing sc2reader (but I used the contributor installation).
mpyq is installed and sc2reader works fine on my machine ;-D
I think the problem for me is when I try to use it in larger python project. I want to use sc2reader a library - as you intended it.
When I run python to compile my app, it can't find mpyq anymore even if I place the mpyq directory in the same location as resources.py - in theory, it should be able to find the mpyq library right?
Perhaps you could take a quick look at my progress log
@EHadoux had an good suggestion about including a requirements.txt file. In my case, I'm trying to deploy to Google App Engine - would a requirements.txt tell the GAE server to install the necessary dependencies like mpyq?
hey hey - some more googling - someone else created one - is this a sound approach?
great that got me unstuck - I just needed to know where the disconnect was happening - it's on the GAE end - I discovered this stackover thread about importing python modules with GAE - I took the simple suggestion to drop in mpyq.py file into my project and its working now... well throwing different errors... but gives me something different to chase after. I'll probably try the slightly more complex lib approach next...
There is no need for a requirements.txt file. Any installation from pypi or source using setup.py will install sc2reader and mypy just fine. I do not understand how someone following the installation directions would have any trouble.
To include sc2reader in a larger project you can add sc2reader to your projects requirements file or install it manually using the normal installation directions.
If you can be more specific about the setup steps you took that failed I can try to improve the documentation.
You're not a junior python dev ;-D you're absolutely right - the instructions are great! I had no trouble installing it just trouble with deploying it. I don't know what the "normal installation directions" are so am going through a lot of python 101 stuff - apologies.
I do not understand how someone following the installation directions would have any trouble.
As far as I remember, the problem came (in my case) from the automatic installation of mpyq with the installation of sc2reader. After installing mpyq alone, sc2reader installed flawlessly.
hey hey - some more googling - someone else created one - is this a sound approach?
It's like that, yes.
I took the simple suggestion to drop in mpyq.py file into my project and its working now...
You can import it is different from it is working. In the example of the link, the "library" consists in a standalone file. I don't think it is the case for mpyq, you cannot use it like that thus. (my bad)
Mpyq is a single file module so that will work just fine.
Separately, I'll add instructions for including sc2reader as a dependency in other projects.
I can definitely help share my notes - as a bronze league python dev, I can share those trivial details that GMs probably wouldn't think worthwhile
I actually just made a major breakthrough in my own experiments - I've successfully deployed my app to GAE - it reads 10 lines of a sc2 replay and returns the camera events as a string which lots a lot like json.
so proud - I know its useless to an end user but I'm making good progress now thanks to your help!
I'm going to close this issue out. To anyone coming upon this issue later, you cannot install your own dependencies on GAE. Instead you need to deploy them along side your project. When doing this you need to resolve all sub-dependencies of your project manually. In this case, you must both add mpyq and sc2reader files to your project.
In the getting started documentation, it states that you need to import the sc2reader module into your python project.
I tried that and received errors about a missing mpyq module which is imported in resources.py. I found mpyq on github and grabbed the source. But then where should I put this mpyq module in my project? does it need to be configured anywhere?