Skip to content
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

Unable to install ujson #47

Open
charu-iitm opened this issue Jul 3, 2018 · 14 comments
Open

Unable to install ujson #47

charu-iitm opened this issue Jul 3, 2018 · 14 comments

Comments

@charu-iitm
Copy link

I am getting following error :
Collecting ujson
Using cached https://files.pythonhosted.org/packages/16/c4/79f3409bc710559015464e5f49b9879430d8f87498ecdc335899732e5377/ujson-1.35.tar.gz
Building wheels for collected packages: ujson
Running setup.py bdist_wheel for ujson ... error
Complete output from command c:\users\chchauha\appdata\local\continuum\anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\chchauha\AppData\Local\Temp\pip-install-eldp188c\ujson\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d C:\Users\chchauha\AppData\Local\Temp\pip-wheel-c7rmlig3 --python-tag cp35:
running bdist_wheel
running build
running build_ext
building 'ujson' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools


Failed building wheel for ujson
Running setup.py clean for ujson
Failed to build ujson
Installing collected packages: ujson
Running setup.py install for ujson ... error
Complete output from command c:\users\chchauha\appdata\local\continuum\anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\chchauha\AppData\Local\Temp\pip-install-eldp188c\ujson\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\chchauha\AppData\Local\Temp\pip-record-10n1ka9p\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
building 'ujson' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools

----------------------------------------

Command "c:\users\chchauha\appdata\local\continuum\anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\chchauha\AppData\Local\Temp\pip-install-eldp188c\ujson\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\chchauha\AppData\Local\Temp\pip-record-10n1ka9p\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\chchauha\AppData\Local\Temp\pip-install-eldp188c\ujson\

I am having Python 3.5.2

@matheusgomes1
Copy link

Install the packages:
sudo apt-get install build-essential python3 python-dev python3-dev
After, run:
pip install --no-cache-dir ujson

@Dobatymo
Copy link

or download the wheels from here https://www.lfd.uci.edu/~gohlke/pythonlibs/#ujson

@vidb6
Copy link

vidb6 commented Oct 18, 2019

Install the packages:
sudo apt-get install build-essential python3 python-dev python3-dev
After, run:
pip install --no-cache-dir ujson

did not work

@marboe123
Copy link

I have the same issue on Windows 10.
I have tried all Python versions although no difference.
Tried many ways of installing Visual Studio although no difference.

@zhfneu
Copy link

zhfneu commented Jan 16, 2020

you can try this comand to Install ujson separately.
conda install -c anaconda ujson

@uozden
Copy link

uozden commented Feb 9, 2020

@zhfneu Thank you. installing byconda install -c anaconda ujson worked on Windows10

@marboe123
Copy link

Sorry for my late reply. In my case it was due to MS Visual C++ 14.0. After following these steps my issue was solved:
https://www.scivision.co/python-windows-visual-c-14-required/
I have selected Workloads C++ build tools and all three SDK additional install options.

@uozden
Copy link

uozden commented Feb 9, 2020

@marboe123 Thank you for sharing your ultimate solution. It is fixed.

@PrimeTime416
Copy link

Thanks you worked like a charm, how did you figure this out, did I miss something in the documentation?

@marboe123
Copy link

@aryabhatta000
Copy link

aryabhatta000 commented May 3, 2020

or download the wheels from here https://www.lfd.uci.edu/~gohlke/pythonlibs/#ujson

After downloading the correct Python version and System appropriate .whl file do this

pip install some-package.whl
pip install C:/some-dir/some-file.whl

stackoverflow reference on installing .whl file
Sharing instructions for beginners like myself

@hikhilthomas
Copy link

Sorry for my late reply. In my case it was due to MS Visual C++ 14.0. After following these steps my issue was solved:
https://www.scivision.co/python-windows-visual-c-14-required/
I have selected Workloads C++ build tools and all three SDK additional install options.

Thank you, after trying for hours this finally worked. Anyone stuck on this just download the build tools file from this link and install it, if you have already downloaded it and not working just open installer again and select modify. While installing or modifying you will be prompted about what should be installed, in workload section select first option which should be C++ build tools and in individual components type sdk in search bar, select all 3 under .NET tab and install, thats it. This should fi your problem.

@vaishnavi-amalladinne
Copy link

uninstall the previous ujson version if you have ujson already
Try pip install ujson==1.35
I guess there are some incompatibility issues with later versions.
This worked for me on Windows 10

@tihon49
Copy link

tihon49 commented Aug 31, 2020

Solved for windows 10
Issue #61

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests