explosion / srsly

🦉 Modern high-performance serialization utilities for Python (JSON, MessagePack, Pickle)
MIT License
438 stars 31 forks source link

No module named 'srsly.ujson.ujson' #3

Closed antoineGit closed 5 years ago

antoineGit commented 5 years ago

I'm installing srsly on an AWS lambda but I keep getting an error : No module named 'srsly.ujson.ujson'

It's install with srsly inside its package but can't be access. I tried to change all declaration to a global import ujson which i downloaded without any success ...

Any ideas ?

PS : I'm installing a Spacy lambda which require srsly

ines commented 5 years ago

Can you check if srsly installed and compiled correctly? srsly.ujson.ujson exists see here – but it seems like Python can't load it, because it's not compiled?

nagarajanshanmuganthan commented 5 years ago

I have installed srsly using pip3 install srsly -t . inside a directory which I am loading to \tmp folder of my Lambda. The srsly/ujson folder has all the files that are present in the link which you've given above.

Why is my Lambda not able to load it? How to compile srsly separately? Even I am importing Spacy which requires srsly.

Thanks.

georgechen1 commented 3 years ago

@nagarajanshanmuganthan @antoineGit Did you guys ever figure this out? I'm dealing with the same issue now

kooshatp commented 3 years ago

same issue... any solutions?

gatha-codeparity commented 3 years ago

For those who are running into this issue. Please try with a fresh dev environment. Also please check if you have installed spacy and srsly only through pip or conda. Not both.

polm commented 3 years ago

Similar issue here: https://github.com/explosion/spaCy/discussions/8199

In that issue the person had some dependencies installed with vanilla Python and some with Anaconda. So it seems likely this is an environment issue, and should be fixable by uninstalling everything and then reinstalling.

cuhe-la commented 2 years ago

I have installed srsly using pip3 install srsly -t . inside a directory which I am loading to \tmp folder of my Lambda. The srsly/ujson folder has all the files that are present in the link which you've given above.

Why is my Lambda not able to load it? How to compile srsly separately? Even I am importing Spacy which requires srsly.

Thanks.

python -m pip install srsly --no-binary=:all: or pip install srsly --no-binary=:all:

might be helpful. It ignores existing wheel(from repository) and compile a new one.

More information about --no-binary option: https://pip.pypa.io/en/latest/cli/pip_install/#cmdoption-no-binary

polm commented 2 years ago

While installing from source is likely to always work, many users find it more difficult than installing wheels. Also wheels should work in general, and if they don't it can indicate other issues with the environment.