New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem installing 6.0 on newly installed Ubuntu machine #33
Comments
Hmm, works for me on a similar-but-not-identical system (Python 2.7.3/pip 1.0/virtualenv 1.7.1.2). Are there any more details in the pip.log file mentioned? |
I tried installing pip 1.0 as well but the same issue. I also tried it out with an older version of setuptools in case that was the issue, I'm currently running 2.1 in the VM, but switching to 1.4.2 which is the same version as on my dev computer didn't work either. I'm not entirely sure what else to look at, for reference here is my (test)deploy@opening-hours:~$ pip freeze
argparse==1.2.1
wsgiref==0.1.2 Here is the complete log when trying to install with setuptools 2.1: https://gist.github.com/gaqzi/9483407 |
Nothing helpful in the log file sadly (the stack is just pip code, not python-phonenumbers code). Random thought: you're not low on disk space by any chance? The metadata (and therefore the package) gets bigger with every release... |
Experiencing the same problem. We run VMs on AWS.
|
I'm getting the exact same error message as well on my VMs. The compilation starts taking a lot of memory, it starts swapping. And then the process dies, and I get this error. (I believe it's pip itself generating the error because the sub-process died) @daviddrysdale I think it's getting OOM killed, or |
@daviddrysdale: there's plenty of space, 6GB free. On Tue, Mar 11, 2014 at 7:48 PM, David Drysdale notifications@github.comwrote:
"Beauty is more important in computing than anywhere else in technology |
@gaqzi Can you confirm what I just wrote. When your installing phonenumbers, can you monitor the memory of your server. Is the installation consuming a lot of memory? |
Nothing significant changed in the code structure between 5.9.2 and 6.0.0, but the size of the geographic metadata increased substantially ( Folks who can reproduce the problem: what happens if you unpack the 6.0.0 code and try to |
@acatton you're correct, it balloons like mad when installing. I tried it on my dev machine and I use around ~400MB during one brief phase of installation. I'll try on a VM as soon as I can as well. |
@daviddrysdale: I've tried that out and just including |
Thanks for the updates; it sounds like I need to split the geodata out into a separate package, like the upstream Java project does. |
Just importing geodata takes about 2 seconds on my machine, even after the pyc is compiled. Have you considered shipping a compiled shelve database? Since GEOCODE_DATA is just a dictionary, shelve works quite well. I did some testing and opening and retrieving keys from the shelved data is instant. By distributing the shelve file itself, you could avoid the memory problems, and speed up the initial import of phonenumbers. |
I had a play with |
What about SQLite? I found an example here of storing blobs in Python SQLite: http://eli.thegreenplace.net/2009/05/29/storing-blobs-in-a-sqlite-db-with-pythonpysqlite/ |
Can you guys test out #34? I need to give another glance over to make sure it's production ready, but the overall implementation is there. Tests passed and I was able to install in a low-memory VM where this problem surfaced. |
To test it out, run this: pip install git+git://github.com/path/python-phonenumbers.git@c1f99689a4eed256c1a678be3afec04bffbbb8c1#egg=phonenumbers |
I have the same problem, I have tried 6.0.0, 5.9.2 and 5.9.1 and also the this last #34. All consume the 512MB of ram plus 512MB of swap of my VM until it dies. |
@chemary You can somewhat bypass the problem by installing via The downside is that the bytecode will get compiled on first load. If you're running a web server, this isn't a problem. Just I got #34 working on a VM with 128mb memory so I'm curious why it didn't work for you. How exactly did you install? |
Hi @artnez, I installed with Installation by other ways means changing our deployment scripts, so I will try to validate phone numbers by simple regex for now. |
Splitting the metadata into chunks seems sensible regardless, so I've merged that -- thanks @artnez . I've also got an initial attempt to build a @chemary, could you try |
The package installs fine, I have tested it a little and seems to work fine. |
If it installs OK, it's probably fine -- it's basically the same package but missing a few large metadata directories. (Obviously none of the |
OK, I think this is done. To summarize:
|
@daviddrysdale When will this hit pypi? |
Ah, looks like I only pushed |
Thanks man.
|
I just tried installing phonenumbers on a newly installed Ubuntu 12.04 installation.
I'm running these versions of things:
Python: 2.7.3
pip: 1.5.1
virtualenv: 1.11.1
To repeat:
I've no idea what error code -9 means, but it works if I install version 5.9.2 instead.
The text was updated successfully, but these errors were encountered: