Can't install tables on Python - python

I keep getting the error
Command "python setup.py egg_info" failed with error code 1 in C:\Users\HP\AppData\Local\Temp\pip-install-sv33cp8y\tables\
when trying to use
pip install tables
I've tried
pip install --upgrade setuptools
and quite a few other things but still can't get it to work.
The full error that I'm getting is:
Collecting tables
Using cached https://files.pythonhosted.org/packages/4d/53/8f34ce887c2a2ad80518980419a5f6f41defc85a287a355987e559ce9385/tables-3.4.4.tar.gz
Complete output from command python setup.py egg_info:
* Using Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:57:15) [MSC v.1915 64 bit (AMD64)]
* USE_PKGCONFIG: False
Traceback (most recent call last):
File "c:\python37\lib\site-packages\setuptools\msvc.py", line 489, in _find_latest_available_vc_ver
return self.find_available_vc_vers()[-1]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\HP\AppData\Local\Temp\pip-install-5bjrxgs8\tables\setup.py", line 633, in <module>
libraries=(package.library_name,))
File "c:\python37\lib\distutils\ccompiler.py", line 791, in has_function
objects = self.compile([fname], include_dirs=include_dirs)
File "c:\python37\lib\distutils\_msvccompiler.py", line 345, in compile
self.initialize()
File "c:\python37\lib\distutils\_msvccompiler.py", line 238, in initialize
vc_env = _get_vc_env(plat_spec)
File "c:\python37\lib\site-packages\setuptools\msvc.py", line 185, in msvc14_get_vc_env
return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()
File "c:\python37\lib\site-packages\setuptools\msvc.py", line 843, in __init__
self.si = SystemInfo(self.ri, vc_ver)
File "c:\python37\lib\site-packages\setuptools\msvc.py", line 485, in __init__
self.vc_ver = vc_ver or self._find_latest_available_vc_ver()
File "c:\python37\lib\site-packages\setuptools\msvc.py", line 492, in _find_latest_available_vc_ver
raise distutils.errors.DistutilsPlatformError(err)
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\HP\AppData\Local\Temp\pip-install-5bjrxgs8\tables\
I'm basically trying to convert a hdf5 file into a csv and I just can't get it to work or anything at the moment.

Might be a permission issue.
Try :
sudo pip install --upgrade setuptools
Also refer to the discussion here. Some folks had this problem with python version.

Related

spaCy installation error during cythonisation

I am trying to compile spaCy on a macOS Sierra. I just installed XCode and my gcc --version shows this:
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Installing the requirements works fine, but running python setup.py build_ext --inplace gives me this error:
Obtaining file://~/code/spaCy
Complete output from command python setup.py egg_info:
[Errno 2] No such file or directory: '~/code/spaCy/spacy/cfile.pyx'
Processing cfile.pyx
Traceback (most recent call last):
File "~/code/spaCy/bin/cythonize.py", line 157, in <module>
run(args.root)
File "~/code/spaCy/bin/cythonize.py", line 148, in run
process(base, filename, db)
File "~/code/spaCy/bin/cythonize.py", line 114, in process
preserve_cwd(base, process_pyx, root + '.pyx', root + '.cpp')
File "~/code/spaCy/bin/cythonize.py", line 79, in preserve_cwd
func(*args)
File "~/code/spaCy/bin/cythonize.py", line 61, in process_pyx
raise Exception('Cython failed')
Exception: Cython failed
Cythonizing sources
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "~/code/spaCy/setup.py", line 227, in <module>
setup_package()
File "~/code/spaCy/setup.py", line 172, in setup_package
generate_cython(root, 'spacy')
File "~/code/spaCy/setup.py", line 104, in generate_cython
raise RuntimeError('Running cythonize failed')
RuntimeError: Running cythonize failed
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in ~/code/spaCy/
Is there an easy way to debug this? Or am I missing some configuration step?

Installation error:Pyproj

I try to install pyprog from cmd but I've the following error. Who can explain me to fix it?!
Collecting pyproj (from LatLon)
Using cached pyproj-1.9.5.1.tar.gz
Complete output from command python setup.py egg_info:
using bundled proj4..
Traceback (most recent call last):
File "C:\Users\Andrea\AppData\Local\Programs\Python\Python36\lib\site-packages\setuptools\msvc.py", line 490, in _find_latest_available_vc_ver
return self.find_available_vc_vers()[-1]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Andrea\AppData\Local\Temp\pycharm-packaging\pyproj\setup.py", line 72, in <module>
objects = cc.compile(['nad2bin.c', 'src/pj_malloc.c'])
File "C:\Users\Andrea\AppData\Local\Programs\Python\Python36\lib\distutils\_msvccompiler.py", line 345, in compile
self.initialize()
File "C:\Users\Andrea\AppData\Local\Programs\Python\Python36\lib\distutils\_msvccompiler.py", line 238, in initialize
vc_env = _get_vc_env(plat_spec)
File "C:\Users\Andrea\AppData\Local\Programs\Python\Python36\lib\site-packages\setuptools\msvc.py", line 185, in msvc14_get_vc_env
return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()
File "C:\Users\Andrea\AppData\Local\Programs\Python\Python36\lib\site-packages\setuptools\msvc.py", line 844, in __init__
self.si = SystemInfo(self.ri, vc_ver)
File "C:\Users\Andrea\AppData\Local\Programs\Python\Python36\lib\site-packages\setuptools\msvc.py", line 486, in __init__
self.vc_ver = vc_ver or self._find_latest_available_vc_ver()
File "C:\Users\Andrea\AppData\Local\Programs\Python\Python36\lib\site-packages\setuptools\msvc.py", line 493, in _find_latest_available_vc_ver
raise distutils.errors.DistutilsPlatformError(err)
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Andrea\AppData\Local\Temp\pycharm-packaging\pyproj\
For those on Macs that won't find helpful answers: try
pip install git+https://github.com/jswhit/pyproj.git
this will probably ask you to install cython, so do just this
pip install cython
This worked for me when nothing else worked. Thanks to #micahcochran on github.
The solution is written in the last line:
Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
Did you tried download and install it?
You can download pyproj binaries from here and install via: pip install <filename>.whl

"python setup.py egg_info" error for pyproj package but not others

I've been trying to install the pyproj python package (I want to use the stateplane part specifically). Long story short.. I have a csv of lat, long, and a variable value and wanted to extract data for each state. I was going to use the
stateplane.identify(-80.1, 36.2, fmt='short')
feature to identify the state. I have verified that I have python 3.6.3 and pip 9.0.1. Doing pip install worked for the libusb package, but I'm getting an error when I do
pip install pyproj
Collecting pyproj
Using cached pyproj-1.9.5.1.tar.gz
Complete output from command python setup.py egg_info:
using bundled proj4..
Traceback (most recent call last):
File "c:\python36-32\lib\site-packages\setuptools\msvc.py", line 490, in _
find_latest_available_vc_ver
return self.find_available_vc_vers()[-1]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\smshp\AppData\Local\Temp\pip-build-_bzisu0o\pyproj\setup.py
", line 72, in <module>
objects = cc.compile(['nad2bin.c', 'src/pj_malloc.c'])
File "c:\python36-32\lib\distutils\_msvccompiler.py", line 345, in compile
self.initialize()
File "c:\python36-32\lib\distutils\_msvccompiler.py", line 238, in initial
ize
vc_env = _get_vc_env(plat_spec)
File "c:\python36-32\lib\site-packages\setuptools\msvc.py", line 185, in m
svc14_get_vc_env
return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()
File "c:\python36-32\lib\site-packages\setuptools\msvc.py", line 844, in _
_init__
self.si = SystemInfo(self.ri, vc_ver)
File "c:\python36-32\lib\site-packages\setuptools\msvc.py", line 486, in _
_init__
self.vc_ver = vc_ver or self._find_latest_available_vc_ver()
File "c:\python36-32\lib\site-packages\setuptools\msvc.py", line 493, in _
find_latest_available_vc_ver
raise distutils.errors.DistutilsPlatformError(err)
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is requir
ed. Get it with "Microsoft Visual C++ Build Tools":
http://landinghub.visualstud
io.com/visual-cpp-build-tools
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in
C:\Users\smshp\Ap
pData\Local\Temp\pip-build-_bzisu0o\pyproj\
I have followed the troubleshooting tips from this post word to no avail.
Alternatively, if I downloaded the repo and did
python setup.py install
would I download the .whl or tar.gz file and would I download it to the python36-32 directory or where?
Thanks!

Python, install Pytables: ValueError: [u'path']

I use command 'pip install tables' in powershell (Windows) to install Pytables. Yet I receive the ValueError: [u'path'].
In red is written 'Command "python setup.py egg_info" failed with error code 1'.
I have miniconda installed.
EDIT: the full red error message is the following:
'Command "python setup.py egg_info" failed with error code 1 in c:\users\evert\appdata\local\temp\pip-build-9wkucl\tables
\'
Between my pip install command and the red error message is written the following:
Collecting tables
Using cached tables-3.2.2.tar.gz
Complete output from command python setup.py egg_info:
* Using Python 2.7.11 |Continuum Analytics, Inc.| (default, Feb 16 2016, 09:58:36) [MSC v.1500 64 bit (AMD64)]
* USE_PKGCONFIG: False
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\evert\appdata\local\temp\pip-build-9wkucl\tables\setup.py", line 553, in <module>
libraries=(package.library_name,))
File "c:\users\evert\miniconda2\lib\distutils\ccompiler.py", line 758, in has_function
objects = self.compile([fname], include_dirs=include_dirs)
File "c:\users\evert\miniconda2\lib\distutils\msvc9compiler.py", line 473, in compile
self.initialize()
File "c:\users\evert\miniconda2\lib\distutils\msvc9compiler.py", line 383, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "c:\users\evert\miniconda2\lib\site-packages\setuptools-20.3-py2.7.egg\setuptools\msvc9_support.py", line 52,
in query_vcvarsall
File "c:\users\evert\miniconda2\lib\distutils\msvc9compiler.py", line 299, in query_vcvarsall
raise ValueError(str(list(result.keys())))
ValueError: [u'path']
Which part is missing? Which steps should I execute before running 'pip install tables'?
Thank you for your help.
This is a problem with not being able to correctly setup certain environment variables required for the setup using vcvarsall.bat. You can download a binary of pytables here instead and do pip install tables-3.2.2-*.whl. Be sure to download the binary matching your version and system architecture.

Trouble installing django-imagekit - 'execfile' is not defined

I am having problems installing django-imagekit under python 3.2/django 1.5. Is django-imagekit only for python 2 (then why is it available in pip-3.2)?
Trying to install django-imagekit from within my virtualenv.
------------------------------------------------------------
/home/testuser/webapps/app/bin/pip run on Tue Nov 19 10:38:45 2013
Downloading/unpacking django-imagekit
Running setup.py egg_info for package django-imagekit
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/home/testuser/webapps/app/build/django-imagekit/setup.py", line 25, in <module>
execfile(os.path.join(os.path.dirname(__file__),
NameError: name 'execfile' is not defined
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/home/testuser/webapps/app/build/django-imagekit/setup.py", line 25, in <module>
execfile(os.path.join(os.path.dirname(__file__),
NameError: name 'execfile' is not defined
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /home/testuser/webapps/app/build/django-imagekit
Exception information:
Traceback (most recent call last):
File "/home/testuser/webapps/app/lib/python3.2/site-packages/pip-1.1-py3.2.egg/pip/basecommand.py", line 104, in main
status = self.run(options, args)
File "/home/testuser/webapps/app/lib/python3.2/site-packages/pip-1.1-py3.2.egg/pip/commands/install.py", line 245, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/home/testuser/webapps/app/lib/python3.2/site-packages/pip-1.1-py3.2.egg/pip/req.py", line 1009, in prepare_files
req_to_install.run_egg_info()
File "/home/testuser/webapps/app/lib/python3.2/site-packages/pip-1.1-py3.2.egg/pip/req.py", line 225, in run_egg_info
req_to_install.run_egg_info()
File "/home/testuser/webapps/app/lib/python3.2/site-packages/pip-1.1-py3.2.egg/pip/req.py", line 225, in run_egg_info
command_desc='python setup.py egg_info')
File "/home/testuser/webapps/app/lib/python3.2/site-packages/pip-1.1-py3.2.egg/pip/__init__.py", line 256, in call_subprocess
% (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command python setup.py egg_info failed with error code 1 in /home/testuser/webapps/app/build/django-imagekit
It doesn't look like this module has been updated for python3 yet. Django has only officially supported python3 since 1.5, so several packages have yet to update.
I'm the maintainer of django-imagekit and, unfortunately, it isn't quite ready for Python 3 yet. As for why it's "available" for pip-3.2…My understanding is that pip doesn't do any filtering of packages based on the version of Python you're using; pip-3.2 is named that way because it installs packages into Python 3.2, but it doesn't use a separate index.
EDIT:
We just pushed ImageKit 3.2 which has support for Python 3! Give it a try (:

Categories

Resources