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
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
I have followd the link provided by Keras to download theano backend linkon windows (mine is windows 10). but when I import Kares. I got the followings:
Problem occurred during compilation with the command line below:
"C:\MinGW\bin\g++.exe" -shared -g -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m64 -DMS_WIN64 -I"C:\Python27\lib\site-packages\numpy\core\include" -I"C:\Python27\include" -I"C:\Users\M\AppData\Roaming\Python\Python27\site-packages\theano\gof" -L"C:\Python27\libs" -L"C:\Python27" -o C:\Users\M\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-2.7.13-64\lazylinker_ext\lazylinker_ext.pyd C:\Users\M\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-2.7.13-64\lazylinker_ext\mod.cpp -lpython27
Traceback (most recent call last):
File "C:\Users\M\Desktop\Experiment_Calculation.py", line 5, in <module>
import keras
File "C:\Users\M\AppData\Roaming\Python\Python27\site-packages\keras\__init__.py", line 3, in <module>
from . import activations
File "C:\Users\M\AppData\Roaming\Python\Python27\site-packages\keras\activations.py", line 4, in <module>
from . import backend as K
File "C:\Users\M\AppData\Roaming\Python\Python27\site-packages\keras\backend\__init__.py", line 70, in <module>
from .theano_backend import *
File "C:\Users\M\AppData\Roaming\Python\Python27\site-packages\keras\backend\theano_backend.py", line 3, in <module>
import theano
File "C:\Users\M\AppData\Roaming\Python\Python27\site-packages\theano\__init__.py", line 66, in <module>
from theano.compile import (
File "C:\Users\M\AppData\Roaming\Python\Python27\site-packages\theano\compile\__init__.py", line 10, in <module>
from theano.compile.function_module import *
File "C:\Users\M\AppData\Roaming\Python\Python27\site-packages\theano\compile\function_module.py", line 21, in <module>
import theano.compile.mode
File "C:\Users\M\AppData\Roaming\Python\Python27\site-packages\theano\compile\mode.py", line 10, in <module>
import theano.gof.vm
File "C:\Users\M\AppData\Roaming\Python\Python27\site-packages\theano\gof\vm.py", line 662, in <module>
from . import lazylinker_c
File "C:\Users\M\AppData\Roaming\Python\Python27\site-packages\theano\gof\lazylinker_c.py", line 127, in <module>
preargs=args)
File "C:\Users\M\AppData\Roaming\Python\Python27\site-packages\theano\gof\cmodule.py", line 2316, in compile_str
(status, compile_stderr.replace('\n', '. ')))
Exception: Compilation failed (return status=1): C:\Users\M\AppData\Local\Theano\compiledir_Windows-10-10.0.14393-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-2.7.13-64\lazylinker_ext\mod.cpp:1:0: sorry, unimplemented: 64-bit mode not compiled in
. #include <Python.h>
. ^
.
I don't get the issue, Can Anyone please help with this problem?
I solved the above problem by editting the path enviroments, because I figured out that I have two version of Mingw. Thus, I removed the old one.
However, I got another error while downloading Kares following the link [link]
The error is as follows:
running develop
running egg_info
writing dependency_links to Keras.egg-info\dependency_links.txt
writing Keras.egg-info\PKG-INFO
writing requirements to Keras.egg-info\requires.txt
writing top-level names to Keras.egg-info\top_level.txt
reading manifest file 'Keras.egg-info\SOURCES.txt'
writing manifest file 'Keras.egg-info\SOURCES.txt'
running build_ext
Creating c:\python\python35\lib\site-packages\Keras.egg-link (link to .)
Keras 2.0.4 is already the active version in easy-install.pth
Installed c:\users\m\anaconda2\lib\site-packages\keras
Processing dependencies for Keras==2.0.4
Searching for scipy>=0.14
Reading https://pypi.python.org/simple/scipy/
Best match: scipy 0.19.0
Downloading https://pypi.python.org/packages/e5/93/9a8290e7eb5d4f7cb53b9a7ad7b92b9827ecceaddfd04c2a83f195d8767d/scipy-0.19.0.zip#md5=91b8396231eec780222a57703d3ec550
Processing scipy-0.19.0.zip
Writing C:\Users\M\AppData\Local\Temp\easy_install-dqpyaq0f\scipy-0.19.0\setup.cfg
Running scipy-0.19.0\setup.py -q bdist_egg --dist-dir
C:\Users\M\AppData\Local\Temp\easy_install-dqpyaq0f\scipy-0.19.0\egg-dist-tmp-ebc75q91
C:\Users\M\AppData\Local\Temp\easy_install-dqpyaq0f\scipy-0.19.0\setup.py:323: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
warnings.warn("Unrecognized setuptools command, proceeding with "
Traceback (most recent call last):
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
yield saved
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 243, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 273, in run
return func()
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 242, in runner
_execfile(setup_script, ns)
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 46, in _execfile
exec(code, globals, locals)
File "C:\Users\M\AppData\Local\Temp\easy_install-dqpyaq0f\scipy-0.19.0\setup.py", line 416, in <module>
File "C:\Users\M\AppData\Local\Temp\easy_install-dqpyaq0f\scipy-0.19.0\setup.py", line 396, in setup_package
ImportError: No module named 'numpy'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "setup.py", line 22, in <module>
packages=find_packages())
File "C:\Python\python35\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python\python35\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Python\python35\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python\python35\lib\site-packages\setuptools\command\develop.py", line 34, in run
self.install_for_development()
File "C:\Python\python35\lib\site-packages\setuptools\command\develop.py", line 133, in install_for_development
self.process_distribution(None, self.dist, not self.no_deps)
File "C:\Python\python35\lib\site-packages\setuptools\command\easy_install.py", line 717, in process_distribution
[requirement], self.local_index, self.easy_install
File "C:\Python\python35\lib\site-packages\pkg_resources\__init__.py", line 826, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "C:\Python\python35\lib\site-packages\pkg_resources\__init__.py", line 1092, in best_match
return self.obtain(req, installer)
File "C:\Python\python35\lib\site-packages\pkg_resources\__init__.py", line 1104, in obtain
return installer(requirement)
File "C:\Python\python35\lib\site-packages\setuptools\command\easy_install.py", line 640, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "C:\Python\python35\lib\site-packages\setuptools\command\easy_install.py", line 670, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "C:\Python\python35\lib\site-packages\setuptools\command\easy_install.py", line 850, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "C:\Python\python35\lib\site-packages\setuptools\command\easy_install.py", line 1078, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "C:\Python\python35\lib\site-packages\setuptools\command\easy_install.py", line 1064, in run_setup
run_setup(setup_script, args)
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 246, in run_setup
raise
File "C:\Python\python35\lib\contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "C:\Python\python35\lib\contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 166, in save_modules
saved_exc.resume()
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "C:\Python\python35\lib\site-packages\pkg_resources\_vendor\six.py", line 685, in reraise
raise value.with_traceback(tb)
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
yield saved
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 243, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 273, in run
return func()
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 242, in runner
_execfile(setup_script, ns)
File "C:\Python\python35\lib\site-packages\setuptools\sandbox.py", line 46, in _execfile
exec(code, globals, locals)
File "C:\Users\M\AppData\Local\Temp\easy_install-dqpyaq0f\scipy-0.19.0\setup.py", line 416, in <module>
File "C:\Users\M\AppData\Local\Temp\easy_install-dqpyaq0f\scipy-0.19.0\setup.py", line 396, in setup_package
ImportError: No module named 'numpy'
I don't know why is this occuring. I have numpy intalld already.
Any suggestions ?
I am having issues installing any package on mac os. I have tried updating pip , installed python. uninstalled python and bunch of other stuff that I have tried.
Ran the command pip3 install indicoio
error as below kindly share your thoughts on how I can overcome this error
Collecting indicoio
Using cached IndicoIo-1.0.4.tar.gz
Complete output from command python setup.py egg_info:
warning: no files found matching '*.sh'
no previously-included directories found matching 'docs/_static'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files found matching '.landscape.yaml'
warning: no previously-included files found matching 'appveyor.yml'
warning: no previously-included files found matching 'build_children.sh'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files matching '.git*' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
Traceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 156, in save_modules
yield saved
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 197, in setup_context
yield
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 246, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 276, in run
return func()
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 245, in runner
_execfile(setup_script, ns)
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 47, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-mq2t7d4s/Pillow-3.4.2/setup.py", line 753, in <module>
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.5/site-packages/setuptools/command/bdist_egg.py", line 161, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/usr/local/lib/python3.5/site-packages/setuptools/command/bdist_egg.py", line 147, in call_command
self.run_command(cmdname)
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.5/site-packages/setuptools/command/install_lib.py", line 11, in run
self.build()
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/command/install_lib.py", line 107, in build
self.run_command('build_ext')
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/command/build_ext.py", line 338, in run
self.build_extensions()
File "/tmp/easy_install-mq2t7d4s/Pillow-3.4.2/setup.py", line 521, in build_extensions
ValueError: jpeg is required unless explicitly disabled using --disable-jpeg, aborting
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/tmp/pip-build-669f5s37/indicoio/setup.py", line 52, in <module>
"futures >= 3.0.0"
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/lib/python3.5/site-packages/setuptools/dist.py", line 348, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/local/lib/python3.5/site-packages/setuptools/dist.py", line 394, in fetch_build_eggs
replace_conflicting=True,
File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 826, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1098, in best_match
return self.obtain(req, installer)
File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1110, in obtain
return installer(requirement)
File "/usr/local/lib/python3.5/site-packages/setuptools/dist.py", line 461, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/local/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 664, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/local/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 694, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/local/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 875, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/local/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 1114, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/local/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 1100, in run_setup
run_setup(setup_script, args)
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 249, in run_setup
raise
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 197, in setup_context
yield
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 168, in save_modules
saved_exc.resume()
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 143, in resume
six.reraise(type, exc, self._tb)
File "/usr/local/lib/python3.5/site-packages/pkg_resources/_vendor/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 156, in save_modules
yield saved
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 197, in setup_context
yield
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 246, in run_setup
DirectorySandbox(setup_dir).run(runner)
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 276, in run
return func()
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 245, in runner
_execfile(setup_script, ns)
File "/usr/local/lib/python3.5/site-packages/setuptools/sandbox.py", line 47, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-mq2t7d4s/Pillow-3.4.2/setup.py", line 753, in <module>
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.5/site-packages/setuptools/command/bdist_egg.py", line 161, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/usr/local/lib/python3.5/site-packages/setuptools/command/bdist_egg.py", line 147, in call_command
self.run_command(cmdname)
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.5/site-packages/setuptools/command/install_lib.py", line 11, in run
self.build()
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/command/install_lib.py", line 107, in build
self.run_command('build_ext')
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/command/build_ext.py", line 338, in run
self.build_extensions()
File "/tmp/easy_install-mq2t7d4s/Pillow-3.4.2/setup.py", line 521, in build_extensions
ValueError: jpeg is required unless explicitly disabled using --disable-jpeg, aborting
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-669f5s37/indicoio/
Try using:
sudo python setup.py install
In the directory that you installed the folder. If that doesn't work try
python setup.py --help-command
Above is the code that showed me the other commands on Windows I am not sure what the equivalent is on Mac. But I found specific installation functions such as install_lib and install_scripts.
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.
"C:\Users\Sameer Khanna\Anaconda3\python.exe" "C:/Users/Sameer
Khanna/Desktop/NPann-dce_wrist-db62618c97ac/ex_process_dce_roiwise.py"
Traceback (most recent call last): File "C:\Users\Sameer
Khanna\Anaconda3\lib\site-packages\pyximport\pyximport.py", line 209,
in load_module
inplace=build_inplace, language_level=language_level) File "C:\Users\Sameer
Khanna\Anaconda3\lib\site-packages\pyximport\pyximport.py", line 186,
in build_module
reload_support=pyxargs.reload_support) File "C:\Users\Sameer Khanna\Anaconda3\lib\site-packages\pyximport\pyxbuild.py", line 100,
in pyx_to_dll
dist.run_commands() File "C:\Users\Sameer Khanna\Anaconda3\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd) File "C:\Users\Sameer Khanna\Anaconda3\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run() File "C:\Users\Sameer Khanna\Anaconda3\lib\site-packages\Cython\Distutils\build_ext.py",
line 164, in run
_build_ext.build_ext.run(self) File "C:\Users\Sameer Khanna\Anaconda3\lib\distutils\command\build_ext.py", line 338, in run
self.build_extensions() File "C:\Users\Sameer Khanna\Anaconda3\lib\site-packages\Cython\Distutils\build_ext.py",
line 172, in build_extensions
self.build_extension(ext) File "C:\Users\Sameer Khanna\Anaconda3\lib\distutils\command\build_ext.py", line 532, in
build_extension
depends=ext.depends) File "C:\Users\Sameer Khanna\Anaconda3\lib\distutils_msvccompiler.py", line 315, in compile
self.initialize() File "C:\Users\Sameer Khanna\Anaconda3\lib\distutils_msvccompiler.py", line 208, in
initialize
vc_env = _get_vc_env(plat_spec) File "C:\Users\Sameer Khanna\Anaconda3\lib\distutils_msvccompiler.py", line 81, in
_get_vc_env
vcvarsall, vcruntime = _find_vcvarsall(plat_spec) File "C:\Users\Sameer Khanna\Anaconda3\lib\distutils_msvccompiler.py",
line 34, in _find_vcvarsall
access=winreg.KEY_READ | winreg.KEY_WOW64_32KEY FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:/Users/Sameer
Khanna/Desktop/NPann-dce_wrist-db62618c97ac/ex_process_dce_roiwise.py",
line 7, in
from compartmentmodels.compartmentmodels import TwoCXModel, TwoCUModel, CompartmentModel, ModifiedTofts File "C:\Users\Sameer
Khanna\Desktop\NPann-dce_wrist-db62618c97ac\compartmentmodels\compartmentmodels.py",
line 13, in
from . import c_convolution_exp File "C:\Users\Sameer Khanna\Anaconda3\lib\site-packages\pyximport\pyximport.py", line 435,
in load_module
language_level=self.language_level) File "C:\Users\Sameer Khanna\Anaconda3\lib\site-packages\pyximport\pyximport.py", line 225,
in load_module
raise exc.with_traceback(tb) File "C:\Users\Sameer Khanna\Anaconda3\lib\site-packages\pyximport\pyximport.py", line 209,
in load_module
inplace=build_inplace, language_level=language_level) File "C:\Users\Sameer
Khanna\Anaconda3\lib\site-packages\pyximport\pyximport.py", line 186,
in build_module
reload_support=pyxargs.reload_support) File "C:\Users\Sameer Khanna\Anaconda3\lib\site-packages\pyximport\pyxbuild.py", line 100,
in pyx_to_dll
dist.run_commands() File "C:\Users\Sameer Khanna\Anaconda3\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd) File "C:\Users\Sameer Khanna\Anaconda3\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run() File "C:\Users\Sameer Khanna\Anaconda3\lib\site-packages\Cython\Distutils\build_ext.py",
line 164, in run
_build_ext.build_ext.run(self) File "C:\Users\Sameer Khanna\Anaconda3\lib\distutils\command\build_ext.py", line 338, in run
self.build_extensions() File "C:\Users\Sameer Khanna\Anaconda3\lib\site-packages\Cython\Distutils\build_ext.py",
line 172, in build_extensions
self.build_extension(ext) File "C:\Users\Sameer Khanna\Anaconda3\lib\distutils\command\build_ext.py", line 532, in
build_extension
depends=ext.depends) File "C:\Users\Sameer Khanna\Anaconda3\lib\distutils_msvccompiler.py", line 315, in compile
self.initialize() File "C:\Users\Sameer Khanna\Anaconda3\lib\distutils_msvccompiler.py", line 208, in
initialize
vc_env = _get_vc_env(plat_spec) File "C:\Users\Sameer Khanna\Anaconda3\lib\distutils_msvccompiler.py", line 81, in
_get_vc_env
vcvarsall, vcruntime = _find_vcvarsall(plat_spec) File "C:\Users\Sameer Khanna\Anaconda3\lib\distutils_msvccompiler.py",
line 34, in _find_vcvarsall
access=winreg.KEY_READ | winreg.KEY_WOW64_32KEY ImportError: Building module compartmentmodels.c_convolution_exp failed:
['FileNotFoundError: [WinError 2] The system cannot find the file
specified\n']
Process finished with exit code 1
I get the above error message when trying to use pyximport on Windows.
I am also unable to go through the Cython tutorial, being unable to perform the setup.py and pyximport methods.
I downloaded PyCharm and Anaconda 3.5
What am I doing wrong?
Are you sure that the .pyx file location is in your current directory or PYTHONPATH?
E.g., try to create a file helloworld.pyx with the following contents:
cimport cython
cpdef hello_world():
return 'Hello, World'
save it in the directory from which you started your python interpreter.
and run
>>> import pyximport; pyximport.install()
>>> import helloworld
>>> helloworld.hello_world()
'Hello, World'
Alternatively, you can save helloworld.pyx somewhere else and add this directory to your PYTHONPATH, e.g.,
>>> import sys
>>> sys.path.insert(0, '/Users/Sebastian/Desktop')