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
Related
I'm using Python 3.8 and I'm trying to install numpy on PyCharm 2019.2 but I keep having this error.
I have been told that there are problems in pythons 3.8 and that is why I can't install numpy.
LINK : fatal error LNK1104: cannot open file 'kernel32.lib'
failure.
removing: _configtest.c _configtest.obj _configtest.obj.d
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\hp\AppData\Local\Temp\pycharm-packaging\numpy\setup.py", line 444, in <module>
setup_package()
File "C:\Users\hp\AppData\Local\Temp\pycharm-packaging\numpy\setup.py", line 436, in setup_package
setup(**metadata)
File "C:\Users\hp\AppData\Local\Temp\pycharm-packaging\numpy\numpy\distutils\core.py", line 171, in setup
return old_setup(**new_attr)
File "C:\Users\hp\PycharmProjects\untitled\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg\setuptools\__init__.py", line 145, in setup
File "C:\Users\hp\AppData\Local\Programs\Python\Python38-32\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\hp\AppData\Local\Programs\Python\Python38-32\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\hp\AppData\Local\Programs\Python\Python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\hp\AppData\Local\Temp\pycharm-packaging\numpy\numpy\distutils\command\install.py", line 62, in run
r = self.setuptools_run()
File "C:\Users\hp\AppData\Local\Temp\pycharm-packaging\numpy\numpy\distutils\command\install.py", line 36, in setuptools_run
return distutils_install.run(self)
File "C:\Users\hp\AppData\Local\Programs\Python\Python38-32\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "C:\Users\hp\AppData\Local\Programs\Python\Python38-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\hp\AppData\Local\Programs\Python\Python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\hp\AppData\Local\Temp\pycharm-packaging\numpy\numpy\distutils\command\build.py", line 47, in run
old_build.run(self)
File "C:\Users\hp\AppData\Local\Programs\Python\Python38-32\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\hp\AppData\Local\Programs\Python\Python38-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\hp\AppData\Local\Programs\Python\Python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\hp\AppData\Local\Temp\pycharm-packaging\numpy\numpy\distutils\command\build_src.py", line 142, in run
self.build_sources()
File "C:\Users\hp\AppData\Local\Temp\pycharm-packaging\numpy\numpy\distutils\command\build_src.py", line 153, in build_sources
self.build_library_sources(*libname_info)
File "C:\Users\hp\AppData\Local\Temp\pycharm-packaging\numpy\numpy\distutils\command\build_src.py", line 286, in build_library_sources
sources = self.generate_sources(sources, (lib_name, build_info))
File "C:\Users\hp\AppData\Local\Temp\pycharm-packaging\numpy\numpy\distutils\command\build_src.py", line 369, in generate_sources
source = func(extension, build_dir)
File "numpy\core\setup.py", line 669, in get_mathlib_info
raise RuntimeError("Broken toolchain: cannot link a simple C program")
RuntimeError: Broken toolchain: cannot link a simple C program
Create a new project and virtual environment in PyCharm. Then try downgrading your python to 3.7.2 and uninstall then reinstall numpy through the project settings in pycharm. In your python or bash terminal run,
conda install python == 3.7.2
If you don't have Anaconda Distribution downloaded then navigate to the "Project Interpreter" in PyCharm and you can install/uninstall libraries directly from there with the plus and minus icon. I think you may have a underlying system problem so going for a fresh install of the dependencies you are having issues with should remedy the problem along with stepping away from version 3.8 of Python.
when I tried to install toga with pip install toga, it installed but gave me an error:
Installed:
3 package(s) to packages.config projects
Traceback (most recent call last):
File "tools\geninterop\geninterop.py", line 292, in <module>
sys.exit(main())
File "tools\geninterop\geninterop.py", line 272, in main
python_h = preprocess_python_headers()
File "tools\geninterop\geninterop.py", line 192, in preprocess_python_headers
for line in _check_output(cmd).splitlines():
File "tools\geninterop\geninterop.py", line 41, in _check_output
output = subprocess.check_output(*args, **kwargs)
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\subprocess.py", line 389, in check_output
**kwargs).stdout
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\subprocess.py", line 466, in run
with Popen(*popenargs, **kwargs) as process:
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\subprocess.py", line 769, in __init__
restore_signals, start_new_session)
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\subprocess.py", line 1172, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\cfast\AppData\Local\Temp\pip-install-fep_tzdy\pythonnet\setup.py", line 405, in <module>
zip_safe=False,
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\distutils\command\build_ext.py", line 339, in run
self.build_extensions()
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\distutils\command\build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\distutils\command\build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "C:\Users\cfast\AppData\Local\Temp\pip-install-fep_tzdy\pythonnet\setup.py", line 191, in build_extension
subprocess.check_call([sys.executable, geninterop, interop_file])
File "c:\users\cfast\appdata\local\programs\python\python37-32\lib\subprocess.py", line 341, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['c:\\users\\cfast\\appdata\\local\\programs\\python\\python37-32\\python.exe', 'tools\\geninterop\\geninterop.py', 'src\\runtime\
----------------------------------------
Command "c:\users\cfast\appdata\local\programs\python\python37-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\cfast\\AppData\\Local\\Temp\\pip-install-'\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\cfast\AppData\Local\Temp\pip-record-crjqtxre\install-record.txt --single-version-extell-fep_tzdy\pythonnet\
my python code:
import toga
class Freedom(toga.App):
def startup(self):
self.main_window = toga.MainWindow(self.name)
self.main_window.app = self
box = toga.Box()
self.main_window.content = box
self.main_window.show()
def main():
return Freedom('Freedom Units', 'org.pybee.freedom')
if __name__ == '__main__':
main()
but when I run my code it gives me this:
Traceback (most recent call last):
File "c:\projects\apps\eclipse\tempCodeRunnerFile.py", line 19, in <module>
main()
File "c:\projects\apps\eclipse\tempCodeRunnerFile.py", line 16, in main
return Freedom('Freedom Units', 'org.pybee.freedom') File
"C:\Users\cfast\AppData\Local\Programs\Python\Python37-32\lib\site-
packages\toga\app.py", line 53, in __init__
self.factory = get_platform_factory(factory) File
"C:\Users\cfast\AppData\Local\Programs\Python\Python37-32\lib\site-
packages\toga\platform.py", line 42, in get_platform_factory
from toga_winforms import factoryModuleNotFoundError: No module named
'toga_winforms'
then I tried to install toga_winforms with pip install toga_Winforms
but it gave me the same first error, I tried looking for solutions but got nowhere.
any help is appreciated.
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.
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 am trying to run a python project that I have not written myself. This has required me to install a series of new libraries, but more importantly, it has required me to install Cython.
I think I've installed Cython succesfully at this point. I am using MinGW for my compiler. When I try to run the project I get the error
ImportError: Building module RayTrace failed: ['DistutilsPlatformError: Unable to find vcvarsall.bat\n']
As far as I've understood this is about setting the path for the compiler. I have created the distutils.cfg file that says MinGW is the compiler as well as put MinGW in Path.
Where do I go from here?
this is the complete traceback:
Traceback (most recent call last):
File "C:\Users\Marten\Python\DisperseIt\DisperseIt.py", line 5, in <module>
from DisperseProjectDisperseCtrlFrame import *
File "C:\Users\Marten\Python\DisperseIt\DisperseProjectDisperseCtrlFrame.py", line 12, in <module>
import SectionCalc
File "C:\Users\Marten\Python\DisperseIt\SectionCalc.py", line 10, in <module>
from RayTrace import CalcIndices
File "C:\Python27\lib\site-packages\cython-0.20.2-py2.7-win32.egg\pyximport\pyximport.py", line 431, in load_module
language_level=self.language_level)
File "C:\Python27\lib\site-packages\cython-0.20.2-py2.7-win32.egg\pyximport\pyximport.py", line 209, in load_module
inplace=build_inplace, language_level=language_level)
File "C:\Python27\lib\site-packages\cython-0.20.2-py2.7-win32.egg\pyximport\pyximport.py", line 186, in build_module
reload_support=pyxargs.reload_support)
File "C:\Python27\lib\site-packages\cython-0.20.2-py2.7-win32.egg\pyximport\pyxbuild.py", line 104, in pyx_to_dll
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:\Python27\lib\site-packages\cython-0.20.2-py2.7-win32.egg\Cython\Distutils\build_ext.py", line 163, in run
_build_ext.build_ext.run(self)
File "C:\Python27\lib\distutils\command\build_ext.py", line 337, in run
self.build_extensions()
File "C:\Python27\lib\site-packages\cython-0.20.2-py2.7-win32.egg\Cython\Distutils\build_ext.py", line 171, in build_extensions
self.build_extension(ext)
File "C:\Python27\lib\distutils\command\build_ext.py", line 496, in build_extension
depends=ext.depends)
File "C:\Python27\lib\distutils\msvc9compiler.py", line 473, in compile
self.initialize()
File "C:\Python27\lib\distutils\msvc9compiler.py", line 383, in initialize
vc_env = query_vcvarsall(VERSION, plat_spec)
File "C:\Python27\lib\distutils\msvc9compiler.py", line 271, in query_vcvarsall
raise DistutilsPlatformError("Unable to find vcvarsall.bat")
ImportError: Building module RayTrace failed: ['DistutilsPlatformError: Unable to find vcvarsall.bat\n']