On an AWS EC2, I cloned pytzwhere using:
sudo git clone --recursive https://github.com/pegler/pytzwhere.git
Then I tried to install it using Python 2.7 and:
sudo python setup.py install
Unfortunately it stops with the following error:
...
Extracting tzwhere-2.2-py2.7.egg to /usr/local/lib/python2.7/site-packages
Traceback (most recent call last):
File "setup.py", line 32, in <module>
'Topic :: Software Development :: Localization',
File "/usr/lib64/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/dist-packages/setuptools/command/install.py", line 67, in run
self.do_egg_install()
File "/usr/lib/python2.7/dist-packages/setuptools/command/install.py", line 117, in do_egg_install
cmd.run()
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 393, in run
self.easy_install(spec, not self.no_deps)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 623, in easy_install
return self.install_item(None, spec, tmpdir, deps, True)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 672, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 820, in install_eggs
return [self.install_egg(dist_filename, tmpdir)]
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 900, in install_egg
os.path.dirname(destination)))
File "/usr/lib64/python2.7/distutils/cmd.py", line 349, in execute
util.execute(func, args, msg, dry_run=self.dry_run)
File "/usr/lib64/python2.7/distutils/util.py", line 309, in execute
func(*args)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1177, in unpack_and_compile
unpack_archive(egg_path, destination, pf)
File "/usr/lib/python2.7/dist-packages/setuptools/archive_util.py", line 50, in unpack_archive
driver(filename, extract_dir, progress_filter)
File "/usr/lib/python2.7/dist-packages/setuptools/archive_util.py", line 117, in unpack_zipfile
data = z.read(info.filename)
File "/usr/lib64/python2.7/zipfile.py", line 935, in read
return self.open(name, "r", pwd).read()
File "/usr/lib64/python2.7/zipfile.py", line 630, in read
data = self.read1(n)
File "/usr/lib64/python2.7/zipfile.py", line 684, in read1
max(n - len_readbuffer, self.MIN_READ_SIZE)
MemoryError
I'll appreciate it if you guide me how to solve this problem.
Related
I am trying to install scipy 1.0.0 in a conda env for another software called GATK.
I installed python 3.6.10 and numpy 1.17.5, which are said to be compatible with scipy 1.0.0 (both in the yml file provided by GATK)
However, when I tried installing via python setup.py build, it returns error message as below. I searched by seems like others are mostly struggling with scipy 1.1.0 or some other errors.
Really appreciate any help!
Thanks!
f2py: build/src.linux-x86_64-3.6/scipy/linalg/flapack.pyf
Reading fortran codes...
Reading file 'build/src.linux-x86_64-3.6/scipy/linalg/flapack.pyf' (format:free)
Traceback (most recent call last):
File "setup.py", line 418, in <module>
setup_package()
File "setup.py", line 414, in setup_package
setup(**metadata)
File "/home/joyzheng/.conda/envs/gatk4.3/lib/python3.6/site-packages/numpy/distutils/core.py", line 171, in setup
return old_setup(**new_attr)
File "/home/joyzheng/.conda/envs/gatk4.3/lib/python3.6/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/home/joyzheng/.conda/envs/gatk4.3/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/joyzheng/.conda/envs/gatk4.3/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/home/joyzheng/.conda/envs/gatk4.3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/joyzheng/.conda/envs/gatk4.3/lib/python3.6/site-packages/numpy/distutils/command/build.py", line 47, in run
old_build.run(self)
File "/home/joyzheng/.conda/envs/gatk4.3/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/home/joyzheng/.conda/envs/gatk4.3/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/joyzheng/.conda/envs/gatk4.3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/joyzheng/.conda/envs/gatk4.3/lib/python3.6/site-packages/numpy/distutils/command/build_src.py", line 142, in run
self.build_sources()
File "/home/joyzheng/.conda/envs/gatk4.3/lib/python3.6/site-packages/numpy/distutils/command/build_src.py", line 159, in build_sources
self.build_extension_sources(ext)
File "/home/joyzheng/.conda/envs/gatk4.3/lib/python3.6/site-packages/numpy/distutils/command/build_src.py", line 319, in build_extension_sources
sources = self.f2py_sources(sources, ext)
File "/home/joyzheng/.conda/envs/gatk4.3/lib/python3.6/site-packages/numpy/distutils/command/build_src.py", line 535, in f2py_sources
+ ['--build-dir', target_dir, source])
File "/home/joyzheng/.conda/envs/gatk4.3/lib/python3.6/site-packages/numpy/f2py/f2py2e.py", line 425, in run_main
postlist = callcrackfortran(files, options)
File "/home/joyzheng/.conda/envs/gatk4.3/lib/python3.6/site-packages/numpy/f2py/f2py2e.py", line 330, in callcrackfortran
postlist = crackfortran.crackfortran(files)
File "/home/joyzheng/.conda/envs/gatk4.3/lib/python3.6/site-packages/numpy/f2py/crackfortran.py", line 3251, in crackfortran
readfortrancode(files, crackline)
File "/home/joyzheng/.conda/envs/gatk4.3/lib/python3.6/site-packages/numpy/f2py/crackfortran.py", line 501, in readfortrancode
dowithline(finalline)
File "/home/joyzheng/.conda/envs/gatk4.3/lib/python3.6/site-packages/numpy/f2py/crackfortran.py", line 796, in crackline
analyzeline(m, pat[1], line)
File "/home/joyzheng/.conda/envs/gatk4.3/lib/python3.6/site-packages/numpy/f2py/crackfortran.py", line 1098, in analyzeline
last_name = updatevars(typespec, selector, attr, edecl)
File "/home/joyzheng/.conda/envs/gatk4.3/lib/python3.6/site-packages/numpy/f2py/crackfortran.py", line 1542, in updatevars
attrspec = [x.strip() for x in markoutercomma(attrspec).split('#,#')]
File "/home/joyzheng/.conda/envs/gatk4.3/lib/python3.6/site-packages/numpy/f2py/crackfortran.py", line 833, in markoutercomma
assert not f, repr((f, line, l))
AssertionError: (-1, 'intent(in))', 'intent(in))')```
- List item
On Mac OS 10.14.6, I'm trying to install lxml for Python 3.6 with:
> STATIC_DEPS=true easy_install-3.6 lxml
I get this exception:
Exception: Command "./configure --prefix=/private/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/build/tmp/libxml2" returned code 1
Here's the entire trace I get:
Searching for lxml Reading https://pypi.python.org/simple/lxml/
Downloading
https://files.pythonhosted.org/packages/03/a8/73d795778143be51d8b86750b371b3efcd7139987f71618ad9f4b8b65543/lxml-4.5.1.tar.gz#sha256=27ee0faf8077c7c1a589573b1450743011117f1aa1a91d5ae776bbc5ca6070f2
Best match: lxml 4.5.1 Processing lxml-4.5.1.tar.gz Writing
/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/setup.cfg
Running lxml-4.5.1/setup.py -q bdist_egg --dist-dir
/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/egg-dist-tmp-mnc4h10m
Building lxml version 4.5.1. Latest version of zlib is 1.2.11
Downloading zlib into libs/zlib-1.2.11.tar.gz from
https://zlib.net/zlib-1.2.11.tar.gz Unpacking zlib-1.2.11.tar.gz into
build/tmp Latest version of libiconv is 1.16 Downloading libiconv into
libs/libiconv-1.16.tar.gz from
https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz Unpacking
libiconv-1.16.tar.gz into build/tmp Latest version of libxml2 is
2.9.10 Downloading libxml2 into libs/libxml2-2.9.10.tar.gz from http://xmlsoft.org/sources/libxml2-2.9.10.tar.gz Unpacking
libxml2-2.9.10.tar.gz into build/tmp Latest version of libxslt is
1.1.34 Downloading libxslt into libs/libxslt-1.1.34.tar.gz from http://xmlsoft.org/sources/libxslt-1.1.34.tar.gz Unpacking
libxslt-1.1.34.tar.gz into build/tmp Starting build in
build/tmp/zlib-1.2.11 Checking for gcc... Compiler error reporting is
too harsh for ./configure (perhaps remove -Werror).
** ./configure aborting. Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 157, in save_modules
yield saved File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 198, in setup_context
yield File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 248, in run_setup
DirectorySandbox(setup_dir).run(runner) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 278, in run
return func() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 246, in runner
_execfile(setup_script, ns) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 47, in _execfile
exec(code, globals, locals) File "/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/setup.py",
line 245, in File
"/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/setup.py",
line 153, in setup_extra_options File
"/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/setupinfo.py",
line 82, in ext_modules File
"/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/buildlibxml.py",
line 391, in build_libxml2xslt File
"/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/buildlibxml.py",
line 330, in cmmi File
"/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/buildlibxml.py",
line 320, in call_subprocess Exception: Command "./configure
--prefix=/private/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/build/tmp/libxml2"
returned code 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File
"/Library/Frameworks/Python.framework/Versions/3.6/bin/easy_install-3.6",
line 11, in
sys.exit(main()) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/easy_install.py",
line 2265, in main
**kw File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py",
line 148, in setup
dist.run_commands() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py",
line 955, in run_commands
self.run_command(cmd) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py",
line 974, in run_command
cmd_obj.run() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/easy_install.py",
line 410, in run
self.easy_install(spec, not self.no_deps) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/easy_install.py",
line 665, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/easy_install.py",
line 695, in install_item
dists = self.install_eggs(spec, download, tmpdir) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/easy_install.py",
line 876, in install_eggs
return self.build_and_install(setup_script, setup_base) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/easy_install.py",
line 1115, in build_and_install
self.run_setup(setup_script, setup_base, args) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/easy_install.py",
line 1101, in run_setup
run_setup(setup_script, args) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 251, in run_setup
raise File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/contextlib.py",
line 99, in exit
self.gen.throw(type, value, traceback) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 198, in setup_context
yield File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/contextlib.py",
line 99, in exit
self.gen.throw(type, value, traceback) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 169, in save_modules
saved_exc.resume() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 144, in resume
six.reraise(type, exc, self._tb) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pkg_resources/_vendor/six.py",
line 685, in reraise
raise value.with_traceback(tb) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 157, in save_modules
yield saved File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 198, in setup_context
yield File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 248, in run_setup
DirectorySandbox(setup_dir).run(runner) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 278, in run
return func() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 246, in runner
_execfile(setup_script, ns) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/sandbox.py",
line 47, in _execfile
exec(code, globals, locals) File "/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/setup.py",
line 245, in File
"/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/setup.py",
line 153, in setup_extra_options File
"/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/setupinfo.py",
line 82, in ext_modules File
"/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/buildlibxml.py",
line 391, in build_libxml2xslt File
"/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/buildlibxml.py",
line 330, in cmmi File
"/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/buildlibxml.py",
line 320, in call_subprocess Exception: Command "./configure
--prefix=/private/var/folders/yd/szy02nx52b912gvn2qhh8nb40000gq/T/easy_install-_ctp1edv/lxml-4.5.1/build/tmp/libxml2"
returned code 1
any help will appreciate!
tanks
Depending on your setup, you might install lxml with one of these commands:
$ apt-get install python-lxml
$ easy_install lxml
$ pip install lxml
I'm trying to install pygit2 using pip python script, but it always fails with this message
error: Unable to find vcvarsall.bat
I don't have Visual Studio installed, so I tried to compile libgit2 using MinGW and it worked. but pip still cant figure that libgit2 is installed.
What am I supposed to do ?
EDIT
I installed Visual Studio express 2010 and run the command again, this time the error different :
Downloading/unpacking pygit2
Running setup.py (path:C:\Users\One\AppData\Local\Temp\pip_build_One\pygit2\setup.py) egg_info for
building 'pygit2_cffi_7cfafa3dx5470904' extension
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "C:\Users\One\AppData\Local\Temp\pip_build_One\pygit2\setup.py", line 197, in <module>
cmdclass=cmdclass)
File "C:\Python34\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python34\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "<string>", line 15, in replacement_run
File "C:\Python34\lib\site-packages\setuptools\command\egg_info.py", line 186, in find_sources
mm.run()
File "C:\Python34\lib\site-packages\setuptools\command\egg_info.py", line 246, in run
self.add_defaults()
File "C:\Python34\lib\site-packages\setuptools\command\egg_info.py", line 282, in add_defaults
sdist.add_defaults(self)
File "C:\Python34\lib\site-packages\setuptools\command\sdist.py", line 161, in add_defaults
build_py = self.get_finalized_command('build_py')
File "C:\Python34\lib\distutils\cmd.py", line 299, in get_finalized_command
cmd_obj.ensure_finalized()
File "C:\Python34\lib\distutils\cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "C:\Python34\lib\site-packages\setuptools\command\build_py.py", line 26, in finalize_opti
_build_py.finalize_options(self)
File "C:\Python34\lib\distutils\command\build_py.py", line 45, in finalize_options
('force', 'force'))
File "C:\Python34\lib\distutils\cmd.py", line 287, in set_undefined_options
src_cmd_obj.ensure_finalized()
File "C:\Python34\lib\distutils\cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "C:\Users\One\AppData\Local\Temp\pip_build_One\pygit2\setup.py", line 103, in finalize_op
ffi, C = get_ffi()
File "pygit2\_utils.py", line 101, in get_ffi
include_dirs=[libgit2_include], library_dirs=[libgit2_lib])
File "C:\Python34\lib\site-packages\cffi\api.py", line 373, in verify
lib = self.verifier.load_library()
File "C:\Python34\lib\site-packages\cffi\verifier.py", line 96, in load_library
self._compile_module()
File "C:\Python34\lib\site-packages\cffi\verifier.py", line 192, in _compile_module
outputfilename = ffiplatform.compile(tmpdir, self.get_extension())
File "C:\Python34\lib\site-packages\cffi\ffiplatform.py", line 38, in compile
outputfilename = _build(tmpdir, ext)
File "C:\Python34\lib\site-packages\cffi\ffiplatform.py", line 62, in _build
dist.run_command('build_ext')
File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python34\lib\site-packages\setuptools\command\build_ext.py", line 52, in run
_build_ext.run(self)
File "C:\Python34\lib\distutils\command\build_ext.py", line 339, in run
self.build_extensions()
File "C:\Python34\lib\distutils\command\build_ext.py", line 448, in build_extensions
self.build_extension(ext)
File "C:\Python34\lib\site-packages\setuptools\command\build_ext.py", line 186, in build_exten
_build_ext.build_extension(self,ext)
File "C:\Python34\lib\distutils\command\build_ext.py", line 503, in build_extension
depends=ext.depends)
File "C:\Python34\lib\distutils\msvc9compiler.py", line 460, in compile
self.initialize()
File "C:\Python34\lib\distutils\msvc9compiler.py", line 371, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\Python34\lib\distutils\msvc9compiler.py", line 287, in query_vcvarsall
raise ValueError(str(list(result.keys())))
ValueError: ['path']
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info\pygit2.egg-info
writing top-level names to pip-egg-info\pygit2.egg-info\top_level.txt
writing pip-egg-info\pygit2.egg-info\PKG-INFO
writing requirements to pip-egg-info\pygit2.egg-info\requires.txt
writing dependency_links to pip-egg-info\pygit2.egg-info\dependency_links.txt
writing manifest file 'pip-egg-info\pygit2.egg-info\SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
running build_ext
building 'pygit2_cffi_7cfafa3dx5470904' extension
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "C:\Users\One\AppData\Local\Temp\pip_build_One\pygit2\setup.py", line 197, in <module>
cmdclass=cmdclass)
File "C:\Python34\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python34\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "<string>", line 15, in replacement_run
File "C:\Python34\lib\site-packages\setuptools\command\egg_info.py", line 186, in find_sources
mm.run()
File "C:\Python34\lib\site-packages\setuptools\command\egg_info.py", line 246, in run
self.add_defaults()
File "C:\Python34\lib\site-packages\setuptools\command\egg_info.py", line 282, in add_defaults
sdist.add_defaults(self)
File "C:\Python34\lib\site-packages\setuptools\command\sdist.py", line 161, in add_defaults
build_py = self.get_finalized_command('build_py')
File "C:\Python34\lib\distutils\cmd.py", line 299, in get_finalized_command
cmd_obj.ensure_finalized()
File "C:\Python34\lib\distutils\cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "C:\Python34\lib\site-packages\setuptools\command\build_py.py", line 26, in finalize_options
_build_py.finalize_options(self)
File "C:\Python34\lib\distutils\command\build_py.py", line 45, in finalize_options
('force', 'force'))
File "C:\Python34\lib\distutils\cmd.py", line 287, in set_undefined_options
src_cmd_obj.ensure_finalized()
File "C:\Python34\lib\distutils\cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "C:\Users\One\AppData\Local\Temp\pip_build_One\pygit2\setup.py", line 103, in finalize_option
ffi, C = get_ffi()
File "pygit2\_utils.py", line 101, in get_ffi
include_dirs=[libgit2_include], library_dirs=[libgit2_lib])
File "C:\Python34\lib\site-packages\cffi\api.py", line 373, in verify
lib = self.verifier.load_library()
File "C:\Python34\lib\site-packages\cffi\verifier.py", line 96, in load_library
self._compile_module()
File "C:\Python34\lib\site-packages\cffi\verifier.py", line 192, in _compile_module
outputfilename = ffiplatform.compile(tmpdir, self.get_extension())
File "C:\Python34\lib\site-packages\cffi\ffiplatform.py", line 38, in compile
outputfilename = _build(tmpdir, ext)
File "C:\Python34\lib\site-packages\cffi\ffiplatform.py", line 62, in _build
dist.run_command('build_ext')
File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python34\lib\site-packages\setuptools\command\build_ext.py", line 52, in run
_build_ext.run(self)
File "C:\Python34\lib\distutils\command\build_ext.py", line 339, in run
self.build_extensions()
File "C:\Python34\lib\distutils\command\build_ext.py", line 448, in build_extensions
self.build_extension(ext)
File "C:\Python34\lib\site-packages\setuptools\command\build_ext.py", line 186, in build_extension
_build_ext.build_extension(self,ext)
File "C:\Python34\lib\distutils\command\build_ext.py", line 503, in build_extension
depends=ext.depends)
File "C:\Python34\lib\distutils\msvc9compiler.py", line 460, in compile
self.initialize()
File "C:\Python34\lib\distutils\msvc9compiler.py", line 371, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\Python34\lib\distutils\msvc9compiler.py", line 287, in query_vcvarsall
raise ValueError(str(list(result.keys())))
ValueError: ['path']
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in C:\Users\One\AppData\Local\Temp\pip_bui
Storing debug log for failure in C:\Users\One\pip\pip.log
Here is the solution for you.
You were probably trying to fix the wrong thing.
vcvarsall.bat is the main issue here
error: Unable to find vcvarsall.bat
I want to install django framework, but I need setuptools for it. I found the same question here on stackoverflow, but it doesn't seem to provide a solution.
I use official installing instructions for setuptools on win7
but it doesn't finish, it says it has been installed, but it isn't completely (I can't import it in django\setup.py). Since it's a module helping to setup other modules it's kind of fail it cannot install itself. I get this error:
Installed c:\python27\lib\site-packages\setuptools-3.4.4-py2.7.egg # installed? i don't think so
Processing dependencies for setuptools==3.4.4
Traceback (most recent call last):
File "setup.py", line 217, in <module>
dist = setuptools.setup(**setup_params)
File "C:\Python27\lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "c:\users\adam\appdata\local\temp\tmpbgu0fr\setuptools-3.4.4\setuptools\c
ommand\install.py", line 61, in run
self.do_egg_install()
File "c:\users\adam\appdata\local\temp\tmpbgu0fr\setuptools-3.4.4\setuptools\c
ommand\install.py", line 111, in do_egg_install
cmd.run()
File "c:\users\adam\appdata\local\temp\tmpbgu0fr\setuptools-3.4.4\setuptools\c
ommand\easy_install.py", line 358, in run
self.easy_install(spec, not self.no_deps)
File "c:\users\adam\appdata\local\temp\tmpbgu0fr\setuptools-3.4.4\setuptools\c
ommand\easy_install.py", line 574, in easy_install
return self.install_item(None, spec, tmpdir, deps, True)
File "c:\users\adam\appdata\local\temp\tmpbgu0fr\setuptools-3.4.4\setuptools\c
ommand\easy_install.py", line 625, in install_item
self.process_distribution(spec, dist, deps)
File "c:\users\adam\appdata\local\temp\tmpbgu0fr\setuptools-3.4.4\setuptools\c
ommand\easy_install.py", line 671, in process_distribution
[requirement], self.local_index, self.easy_install
File "c:\users\adam\appdata\local\temp\tmpbgu0fr\setuptools-3.4.4\pkg_resource
s.py", line 633, in resolve
requirements.extend(dist.requires(req.extras)[::-1])
File "c:\users\adam\appdata\local\temp\tmpbgu0fr\setuptools-3.4.4\pkg_resource
s.py", line 2291, in requires
dm = self._dep_map
File "c:\users\adam\appdata\local\temp\tmpbgu0fr\setuptools-3.4.4\pkg_resource
s.py", line 2277, in _dep_map
for extra,reqs in split_sections(self._get_metadata(name)):
File "c:\users\adam\appdata\local\temp\tmpbgu0fr\setuptools-3.4.4\pkg_resource
s.py", line 2715, in split_sections
for line in yield_lines(s):
File "c:\users\adam\appdata\local\temp\tmpbgu0fr\setuptools-3.4.4\pkg_resource
s.py", line 1989, in yield_lines
for ss in strs:
File "c:\users\adam\appdata\local\temp\tmpbgu0fr\setuptools-3.4.4\pkg_resource
s.py", line 2305, in _get_metadata
for line in self.get_metadata_lines(name):
File "c:\users\adam\appdata\local\temp\tmpbgu0fr\setuptools-3.4.4\pkg_resource
s.py", line 1369, in get_metadata_lines
return yield_lines(self.get_metadata(name))
File "c:\users\adam\appdata\local\temp\tmpbgu0fr\setuptools-3.4.4\pkg_resource
s.py", line 1361, in get_metadata
return self._get(self._fn(self.egg_info,name))
File "c:\users\adam\appdata\local\temp\tmpbgu0fr\setuptools-3.4.4\pkg_resource
s.py", line 1425, in _get
return self.loader.get_data(path)
zipimport.ZipImportError: bad local file header in c:\python27\lib\site-packages
\setuptools-3.4.4-py2.7.egg
Something went wrong during the installation.
See the error message above.
Try the 3.0 version https://pypi.python.org/packages/source/s/setuptools/setuptools-3.0.zip. It worked on my Python v2.75 when I had the same problem.
I'm trying to write a setup.py file for my python project:
import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
requires = [
'requests',
'simplejson',
'logging',
'rfc3987',
]
setup(name='xxxxxxx',
version='0.1',
description='xxxxxxx API',
url='https://github.com/xxxxxxxx',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
install_requires=requires,
)
When I execute it I'm getting this error:
Searching for rfc3987
Reading http://pypi.python.org/simple/rfc3987/
Best match: rfc3987 1.3.1
Downloading https://pypi.python.org/packages/source/r/rfc3987/rfc3987-1.3.1.tar.gz#md5=397b1c1cd8b934269e53a621d56d9ed2
Processing rfc3987-1.3.1.tar.gz
Running rfc3987-1.3.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-AYV_bv/rfc3987-1.3.1/egg-dist-tmp-G8Kbay
Traceback (most recent call last):
File "/usr/bin/easy_install", line 9, in <module>
load_entry_point('distribute==0.6.10', 'console_scripts', 'easy_install')()
File "/usr/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 1715, in main
with_ei_usage(lambda:
File "/usr/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 1696, in with_ei_usage
return f()
File "/usr/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 1719, in <lambda>
distclass=DistributionWithoutHelpCommands, **kw
File "/usr/lib64/python2.6/distutils/core.py", line 152, in setup
dist.run_commands()
File "/usr/lib64/python2.6/distutils/dist.py", line 975, in run_commands
self.run_command(cmd)
File "/usr/lib64/python2.6/distutils/dist.py", line 995, in run_command
cmd_obj.run()
File "/usr/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 236, in run
self.easy_install(spec, not self.no_deps)
File "/usr/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 472, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 502, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 681, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 958, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python2.6/site-packages/setuptools/command/easy_install.py", line 947, in run_setup
run_setup(setup_script, args)
File "/usr/lib/python2.6/site-packages/setuptools/sandbox.py", line 29, in run_setup
lambda: execfile(
File "/usr/lib/python2.6/site-packages/setuptools/sandbox.py", line 70, in run
return func()
File "/usr/lib/python2.6/site-packages/setuptools/sandbox.py", line 31, in <lambda>
{'__file__':setup_script, '__name__':'__main__'}
File "setup.py", line 4, in <module>
File "/tmp/easy_install-AYV_bv/rfc3987-1.3.1/rfc3987.py", line 324, in <module>
File "/tmp/easy_install-AYV_bv/rfc3987-1.3.1/rfc3987.py", line 323, in <genexpr>
File "/tmp/easy_install-AYV_bv/rfc3987-1.3.1/rfc3987.py", line 319, in _interpret_unicode_escapes
ValueError: zero length field name in format
If I try just easy_install rfc3987 I'm getting the same error.
Are there any ways to go around this?
rfc3987 claims that it works on Python 2.7 and 3.x. You're trying to install it on 2.6. So it fails.
The problem has nothing to do with your own package, or with easy_install. If you download the tarball manually and run python2.6 setup.py install, you get the same error. And in fact, at least in 1.3.1, there's code that clearly isn't legal under Python 2.6, like this function.
From the git history, it looks like there have been changes to make it Python 2.6 compatible, so the next release may work. Until then, you won't be able to use it from 2.6.