I want to install the totem app from the source GNOME code.
I cloned source code for totem app from GNOME github, and compiled with messon and ninja commands, and all of that was successfully compiled.
The problem is when I call command meson install, at one point it breaks off.
The steps I followed:
git clone https://github.com/GNOME/totem.git
cd totem
meson builddir
ninja
ninja test
cd ..
meson compile
cd builddir
sudo ninja install
Error which occured:
Traceback (most recent call last):
File "/usr/bin/meson", line 20, in <module>
sys.exit(mesonmain.main())
File "/usr/lib/python3/dist-packages/mesonbuild/mesonmain.py", line 226, in main
return run(sys.argv[1:], launcher)
File "/usr/lib/python3/dist-packages/mesonbuild/mesonmain.py", line 215, in run
return run_script_command(args[1], args[2:])
File "/usr/lib/python3/dist-packages/mesonbuild/mesonmain.py", line 163, in run_script_command
return module.run(script_args)
File "/usr/lib/python3/dist-packages/mesonbuild/scripts/yelphelper.py", line 130, in run
merge_translations(build_subdir, abs_sources, langs)
File "/usr/lib/python3/dist-packages/mesonbuild/scripts/yelphelper.py", line 57, in merge_translations
subprocess.call([
File "/usr/lib/python3.8/subprocess.py", line 340, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib/python3.8/subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'itstool'
FAILED: meson-install
/usr/bin/meson install --no-rebuild
ninja: build stopped: subcommand failed.
Note: I tried on two PC (ubuntu 20.04), and on one PC it works, and other I got an error.
It looks you are missing one of the build dependencies for totem: itstool (converts xml localization (language translations) data); dependent through usage of i18 module here. You can install it with
sudo apt-get install itstool
Here is the list of other required dependencies (latest or another package versions may or may not work though).
Related
I have made an application that I am now distributing on macos and windows (windows successfully compiled) but when I try to compile my app it keeps throwing the error SystemError: codesign failure! In pyinstaller I am using the --onefile flag, and I have tried it without the flag (python pyinstaller.py app.py, I could not use python pyinstaller app.py as I was thrown command not found). This is the full error message:
326 INFO: Building PKG (CArchive) PKG-00.pkg
4245 WARNING: codesign command (['codesign', '-s', '-', '--force', '--all-architectures', '--timestamp', '/Users/admin/Library/Application Support/pyinstaller/bincache00_py39_64bit/x86_64/adhoc/no-entitlements/lib-dynload/resource.cpython-39-darwin.so']) failed with error code 1!
stdout: ''
stderr: '/Users/admin/Library/Application Support/pyinstaller/bincache00_py39_64bit/x86_64/adhoc/no-entitlements/lib-dynload/resource.cpython-39-darwin.so: invalid or unsupported format for signature\n'
Traceback (most recent call last):
File "/Users/admin/Documents/Cloud/hero/pyinstaller.py", line 17, in <module>
run()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/PyInstaller/__main__.py", line 126, in run
run_build(pyi_config, spec_file, **vars(args))
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/PyInstaller/__main__.py", line 65, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/PyInstaller/building/build_main.py", line 815, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/PyInstaller/building/build_main.py", line 762, in build
exec(code, spec_namespace)
File "/Users/admin/Documents/Cloud/hero/app.spec", line 23, in <module>
exe = EXE(pyz,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/PyInstaller/building/api.py", line 509, in __init__
self.pkg = PKG(self.toc, cdict=kwargs.get('cdict', None),
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/PyInstaller/building/api.py", line 208, in __init__
self.__postinit__()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/PyInstaller/building/datastruct.py", line 159, in __postinit__
self.assemble()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/PyInstaller/building/api.py", line 274, in assemble
fnm = checkCache(fnm, strip=self.strip_binaries,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/PyInstaller/building/utils.py", line 391, in checkCache
osxutils.sign_binary(cachedfile, codesign_identity, entitlements_file)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/PyInstaller/utils/osx.py", line 383, in sign_binary
raise SystemError("codesign failure!")
SystemError: codesign failure!
Since I have never compiled an app for mac and this is my first time doing it, I have no idea what this really means. This is using python 3.9.
This seems to be an issue with the way pyinstaller performs ad-hoc signing since codesigning changed sometime after 4.3 (see https://github.com/pyinstaller/pyinstaller/issues/6167). Building on the latest Big Sur (MacOS 11.5.2) should work fine but I assume you're on Catalina or earlier.
You can either:
Downgrade to pyinstaller 4.3 with pip uninstall pyinstaller and pip install -Iv pyinstaller==4.3 and then rebuild as you were.
or
Provide a certificate to sign the app yourself.
If you want to sign the app yourself you can do so like so:
Open Keychain Access
Go to the menu at the top of the screen and select Keychain Access > Certificate Assistant > Create a Certificate
In the window that appears change Certificate Type to Code Signing , select Create and note the name of the certificate
Build your pyinstaller source with the --codesign-identity <name> flag where <name> is the name of the certificate you created in step 3.
I want to install Python 3.7 on a web hosting server that is live (production) without disturbing anything. I have SSH terminal access and I guess the server is running centos from the following commands:
> cat /proc/version
Linux version 3.10.0-693.11.6.1.ELK.el6.x86_64 (...) (gcc version 4.8.2 20140120 (Red Hat 4.8.2-15) (GCC) )
> rpm -qa centos-release
centos-release-6-10.el6.centos.12.3.x86_64
I tried to see what was installed with:
> rpm -qa | sort
...
Python27-2.7.8-1.x86_64
Python27-MySQL-1.2.3-2.el6.x86_64
Python27-bs4-4.1.3-1.noarch
Python27-distribute-0.6.32-1.noarch
Python27-lxml-3.0.1-1.x86_64
Python27-pip-1.2.1-1.noarch
Python27-regex-0.1.20120904-1.x86_64
Python27-virtualenv-1.8.4-1.noarch
Python3-3.2.3-1.x86_64
Python3-distribute-0.6.32-1.noarch
Python3-pip-1.2.1-1.noarch
Python3-virtualenv-1.8.4-1.noarch
...
So it looks like there's Python 2.7 and 3.2 already installed, and I don't want to disturb them.
I want to run a Python 3.7 script with dependencies on some modules.
What is the safest way of installing Python 3.7 (along with pip for modules) somewhere that will not mess with the current installation?
NOTE: I am familiar with conda/pip mostly on Windows, but I have limited knowledge of this linux environment.
EDIT: I first thought it was RHEL. I edited the post for centos.
EDIT: I have tried many unsuccessful attempts to install Python 3.7 on this shared web hosting:
Trying to create a virtualenv with Python 3.2:
> python3 -m virtualenv my_isolated_py3
New python executable in my_isolated_py3/bin/python3
Also creating executable in my_isolated_py3/bin/python
Installing distribute.....................
Complete output from command /home2/cccccc/my_isolated_py3/bin/python3 -c "#!python
\"\"\"Bootstra... sys.exit(main())
":
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.31.tar.gz
Traceback (most recent call last):
File "<string>", line 541, in <module>
File "<string>", line 537, in main
File "<string>", line 201, in download_setuptools
File "/opt/python3/lib/python3.2/urllib/request.py", line 138, in urlopen
return opener.open(url, data, timeout)
File "/opt/python3/lib/python3.2/urllib/request.py", line 375, in open
response = meth(req, response)
File "/opt/python3/lib/python3.2/urllib/request.py", line 487, in http_response
'http', request, response, code, msg, hdrs)
File "/opt/python3/lib/python3.2/urllib/request.py", line 413, in error
return self._call_chain(*args)
File "/opt/python3/lib/python3.2/urllib/request.py", line 347, in _call_chain
result = func(*args)
File "/opt/python3/lib/python3.2/urllib/request.py", line 495, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: SSL is required
----------------------------------------
...Installing distribute...done.
Traceback (most recent call last):
File "/opt/python3/lib/python3.2/runpy.py", line 160, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/opt/python3/lib/python3.2/runpy.py", line 73, in _run_code
exec(code, run_globals)
File "/opt/python3/lib/python3.2/site-packages/virtualenv.py", line 2560, in <module>
main()
File "/opt/python3/lib/python3.2/site-packages/virtualenv.py", line 964, in main
never_download=options.never_download)
File "/opt/python3/lib/python3.2/site-packages/virtualenv.py", line 1071, in create_environment
search_dirs=search_dirs, never_download=never_download)
File "/opt/python3/lib/python3.2/site-packages/virtualenv.py", line 616, in install_distribute
search_dirs=search_dirs, never_download=never_download)
File "/opt/python3/lib/python3.2/site-packages/virtualenv.py", line 583, in _install_req
cwd=cwd)
File "/opt/python3/lib/python3.2/site-packages/virtualenv.py", line 1042, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /home2/cccccc/my_isolated_py3/bin/python3 -c "#!python
\"\"\"Bootstra... sys.exit(main())
" failed with error code 1
The key error is urllib.error.HTTPError: HTTP Error 403: SSL is required, which seems related to old non-https repository.
Trying to create a virtualenv with Python 2.6:
> python -m virtualenv my_isolated_py2
Traceback (most recent call last):
File "/usr/lib64/python2.6/runpy.py", line 122, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib64/python2.6/runpy.py", line 34, in _run_code
exec code in run_globals
File "/usr/lib/python2.6/site-packages/virtualenv.py", line 2352, in <module>
main()
File "/usr/lib/python2.6/site-packages/virtualenv.py", line 825, in main
symlink=options.symlink)
File "/usr/lib/python2.6/site-packages/virtualenv.py", line 985, in create_environment
site_packages=site_packages, clear=clear, symlink=symlink))
File "/usr/lib/python2.6/site-packages/virtualenv.py", line 1179, in install_python
copyfile(join(stdlib_dir, fn), join(lib_dir, fn), symlink)
File "/usr/lib/python2.6/site-packages/virtualenv.py", line 479, in copyfile
copyfileordir(src, dest, symlink)
File "/usr/lib/python2.6/site-packages/virtualenv.py", line 454, in copyfileordir
shutil.copytree(src, dest, symlink)
File "/usr/lib64/python2.6/shutil.py", line 173, in copytree
raise Error, errors
shutil.Error: [('/usr/lib64/python2.6/config/libpython2.6.so', 'my_isolated_py2/lib/python2.6/config/libpython2.6.so', '[Errno 2] No such file or directory')]
Trying to install Python 3.7 miniconda:
> wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
Resolving repo.anaconda.com... 104.16.130.3, 104.16.131.3, 2606:4700::6810:8203, ...
Connecting to repo.anaconda.com|104.16.130.3|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 85055499 (81M) [application/x-sh]
Saving to: `Miniconda3-latest-Linux-x86_64.sh'
100%[=========================================>] 85,055,499 108M/s in 0.8s
2020-06-11 08:22:53 (108 MB/s) - `Miniconda3-latest-Linux-x86_64.sh' saved [85055499/85055499]
> bash Miniconda3-latest-Linux-x86_64.sh
...
Unpacking payload ...
Miniconda3-latest-Linux-x86_64.sh: line 409: /home2/cccccc/miniconda3/preconda.tar.bz2: No such file or directory
Trying to install Python 3.7 from sources:
> wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz
> tar xvzf Python-3.7.3.tgz
> cd Python-3.7.3
> ./configure --prefix=$HOME/python_37
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for python3.7... no
checking for python3... python3
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... checking for --without-gcc... no
checking for --with-icc... no
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in '/home2/cccccc/Python-3.7.3':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
Trying to install Python 3.7 portable binaries:
> wget https://github.com/indygreg/python-build-standalone/releases/download/20200408/cpython-3.7.7-linux64-20200409T0045.tar.zst
> [unzstd on another machine since not installed here]
> tar -xvf cpython-3.7.7-linux64-20200409T0045.tar
...
tar: python/install/share/man/man1/python3.1: Cannot create symlink to `python3.7.1': No such file or directory
...
> ./python/install/bin/python3.7m
./python/install/bin/python3.7m: /lib64/libc.so.6: version `GLIBC_2.13' not found (required by ./python/install/bin/python3.7m)
I also found out that this shared web hosting greatly limits what we can do through terminal, which is jailshell.
Do I have any options left to use Python 3.7 on this machine?
You can use venv to completely isolate your python environment from all other python versions (and python libraries) installed in the system.
Read the virtual environment, venv, docs here.
I am trying to install SpConv (spatially sparse convolution library), however when running python3 setup.py bdist_wheel, I get an error which seems to be related to Caffe2 not being able to see cuDNN, as I infer from this message:
CMake Error at /home/ivan/.local/lib/python3.6/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake:96 (message):
Your installed Caffe2 version uses cuDNN but I cannot find the cuDNN
libraries. Please set the proper cuDNN prefixes and / or install cuDNN.
I have tried reinstalling cuDNN but no luck. Can I manually point Caffe2 to cuDNN? This is because usually cuda is located in /usr/local/cuda/, however I have it in /usr/lib/cuda.
Full output below:
running bdist_wheel
running build
running build_py
running build_ext
Release
|||||CMAKE ARGS||||| ['-DCMAKE_PREFIX_PATH=/home/ivan/.local/lib/python3.6/site-packages/torch', '-DPYBIND11_PYTHON_VERSION=3.6', '-DSPCONV_BuildTests=OFF', '-DCMAKE_CUDA_FLAGS="--expt-relaxed-constexpr" -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/mnt/home/ivan/second.pytorch/second/spconv/build/lib.linux-x86_64-3.6/spconv', '-DCMAKE_BUILD_TYPE=Release']
-- Caffe2: CUDA detected: 9.1
-- Caffe2: CUDA nvcc is: /usr/bin/nvcc
-- Caffe2: CUDA toolkit directory: /usr
-- Caffe2: Header version is: 9.1
-- Could NOT find CUDNN (missing: CUDNN_INCLUDE_DIR)
CMake Warning at /home/ivan/.local/lib/python3.6/site-packages/torch/share/cmake/Caffe2/public/cuda.cmake:131 (message):
Caffe2: Cannot find cuDNN library. Turning the option off
Call Stack (most recent call first):
/home/ivan/.local/lib/python3.6/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake:88 (include)
/home/ivan/.local/lib/python3.6/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:40 (find_package)
CMakeLists.txt:20 (find_package)
-- Autodetected CUDA architecture(s): 6.1
-- Added CUDA NVCC flags for: -gencode;arch=compute_61,code=sm_61
CMake Error at /home/ivan/.local/lib/python3.6/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake:96 (message):
Your installed Caffe2 version uses cuDNN but I cannot find the cuDNN
libraries. Please set the proper cuDNN prefixes and / or install cuDNN.
Call Stack (most recent call first):
/home/ivan/.local/lib/python3.6/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:40 (find_package)
CMakeLists.txt:20 (find_package)
-- Configuring incomplete, errors occurred!
See also "/mnt/home/ivan/second.pytorch/second/spconv/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeOutput.log".
See also "/mnt/home/ivan/second.pytorch/second/spconv/build/temp.linux-x86_64-3.6/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "setup.py", line 99, in <module>
zip_safe=False,
File "/home/ivan/.local/lib/python3.6/site-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 204, in run
self.run_command('build')
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "setup.py", line 40, in run
self.build_extension(ext)
File "setup.py", line 82, in build_extension
subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/mnt/home/ivan/second.pytorch/second/spconv', '-DCMAKE_PREFIX_PATH=/home/ivan/.local/lib/python3.6/site-packages/torch', '-DPYBIND11_PYTHON_VERSION=3.6', '-DSPCONV_BuildTests=OFF', '-DCMAKE_CUDA_FLAGS="--expt-relaxed-constexpr" -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/mnt/home/ivan/second.pytorch/second/spconv/build/lib.linux-x86_64-3.6/spconv', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
System: Ubuntu 18.04, CUDA 9.1, cuDNN 7.6.3
Found the problem. I needed to set CUDNN_INCLUDE_DIR to /usr/lib/cuda/include (i.e. where the cudnn.h file is located).
Lesson learnt: take time to understand the error, missing: CUDNN_INCLUDE_DIR was key.
Another way to fix this:
Acquire cuDNN from here. You may have to register to do this, but the registration is free.
Unpack the cuDNN archive file.
Move the cuDNN files as follows:
sudo cp cuda/include/cudnn*.h /usr/local/cuda/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn*.h /usr/local/cuda/lib64/libcudnn*
Alternately, place a symoblic link at /usr/local/ pointing to the cuda directory produced by unpacking the cuDNN archive.
I am trying to make a deployment package with additional dependencies as per this guide https://docs.aws.amazon.com/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html
I am doing this as a test, to see how simple it is. So i decided to try and import the first package that popped into my mind which was tldextract.
The guide tells me to make a fir called package, go into that package and then type "pip3 install tldextract --target ."
However, I get an error message:
distutils.errors.DistutilsOptionError: can't combine user with prefix, exec_prefix/home, or install_(plat)base
I have searched through this:
Combine --user with --prefix error with setup.py install
But to no avail.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 360, in run
prefix=options.prefix_path,
File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 784, in install
**kwargs
File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "/usr/lib/python3/dist-packages/pip/wheel.py", line 247, in move_wheel_files
prefix=prefix,
File "/usr/lib/python3/dist-packages/pip/locations.py", line 153, in distutils_scheme
i.finalize_options()
File "/usr/lib/python3.6/distutils/command/install.py", line 274, in finalize_options
raise DistutilsOptionError("can't combine user with prefix, "
distutils.errors.DistutilsOptionError: can't combine user with prefix, exec_prefix/home, or install_(plat)base```
You may have moved passed this, but just in case it helps (this drove me up a wall for the last half hour):
I'm running Debian and was trying to install pymysql, but try issuing the command with sudo:
sudo pip3 install tldextract --target .
I don't know why this worked yet, but will update with more info if I come across any. Files were installed in my local directory owned by root, which is unfortunate, but chown fixed that.
I cannot seem to get the control.ss2tf() function to work for state space MIMO system. The function works perfectly for a SISO system.
The following code is used to run the module:
control.ss2tf(A,B,C,D)
The resulting output indicated that the slycot module was not installed.
I then tried installing slycot with
pip install slycot
This command gave the following output:
Failed building wheel for slycot
Running setup.py clean for slycot
Failed to build slycot
Installing collected packages: slycot
Running setup.py install for slycot ... error
Complete output from command c:\users\wian\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Wian\\AppData\\Local\\Temp\\pip-install-cmcxwtts\\slycot\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Wian\AppData\Local\Temp\pip-record-_n6gj2yv\install-record.txt --single-version-externally-managed --compile:
Running from numpy source directory.
running install
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building py_modules sources
building extension "slycot._wrapper" sources
f2py options: []
adding 'build\src.win-amd64-3.6\build\src.win-amd64-3.6\slycot\src\fortranobject.c' to sources.
adding 'build\src.win-amd64-3.6\build\src.win-amd64-3.6\slycot\src' to include_dirs.
adding 'build\src.win-amd64-3.6\slycot\src\_wrapper-f2pywrappers.f' to sources.
build_src: building npy-pkg config files
running build_py
copying slycot\version.py -> build\lib.win-amd64-3.6\slycot
copying build\src.win-amd64-3.6\slycot\__config__.py -> build\lib.win-amd64-3.6\slycot
running build_ext
Looking for python36.dll
Building import library (arch=AMD64): "c:\users\wian\anaconda3\libs\libpython36.a" (from c:\users\wian\anaconda3\python36.dll)
objdump.exe: c:\users\wian\anaconda3\python36.dll: file format not recognized
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Wian\AppData\Local\Temp\pip-install-cmcxwtts\slycot\setup.py", line 241, in <module>
setup_package()
File "C:\Users\Wian\AppData\Local\Temp\pip-install-cmcxwtts\slycot\setup.py", line 233, in setup_package
setup(**metadata)
File "c:\users\wian\anaconda3\lib\site-packages\numpy\distutils\core.py", line 171, in setup
return old_setup(**new_attr)
File "c:\users\wian\anaconda3\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "c:\users\wian\anaconda3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\wian\anaconda3\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "c:\users\wian\anaconda3\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\users\wian\anaconda3\lib\site-packages\numpy\distutils\command\install.py", line 62, in run
r = self.setuptools_run()
File "c:\users\wian\anaconda3\lib\site-packages\numpy\distutils\command\install.py", line 36, in setuptools_run
return distutils_install.run(self)
File "c:\users\wian\anaconda3\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "c:\users\wian\anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\wian\anaconda3\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\users\wian\anaconda3\lib\site-packages\numpy\distutils\command\build.py", line 47, in run
old_build.run(self)
File "c:\users\wian\anaconda3\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\users\wian\anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\wian\anaconda3\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\users\wian\anaconda3\lib\site-packages\numpy\distutils\command\build_ext.py", line 116, in run
force=self.force)
File "c:\users\wian\anaconda3\lib\site-packages\numpy\distutils\ccompiler.py", line 765, in new_compiler
compiler = klass(None, dry_run, force)
File "c:\users\wian\anaconda3\lib\site-packages\numpy\distutils\mingw32ccompiler.py", line 103, in __init__
build_import_library()
File "c:\users\wian\anaconda3\lib\site-packages\numpy\distutils\mingw32ccompiler.py", line 415, in build_import_library
return _build_import_library_amd64()
File "c:\users\wian\anaconda3\lib\site-packages\numpy\distutils\mingw32ccompiler.py", line 471, in _build_import_library_amd64
generate_def(dll_file, def_file)
File "c:\users\wian\anaconda3\lib\site-packages\numpy\distutils\mingw32ccompiler.py", line 301, in generate_def
raise ValueError("Symbol table not found")
ValueError: Symbol table not found
I read that this is due to a FORTRAN compiler not installed on the system. I therefore installed gfortran with Ming32. To verify the install I ran the following:
(base) C:\WINDOWS\system32>gfortran
gfortran: fatal error: no input files
compilation terminated.
So gfortran is installed as a compiler, but yet pip remain unable to install slycot. I have also installed Microsoft Visual Studio 2017.
At this point I went to PyPi library to download the compiled binary of the slycot module. https://www.lfd.uci.edu/~gohlke/pythonlibs/
Here I downloaded the correct .whl file for my system (64 bit Python 3.6), and installed it with pip.
pip install "C:\Users\Wian\Desktop\slycot-0.3.3-cp36-cp36m-win_amd64.whl"
Using this command slycot 0.3.3 was installed successfully. However, when i run the command
control.ss2tf(A,B,C,D)
I get the following output
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
~\Anaconda3\lib\site-packages\control\xferfcn.py in _convertToTransferFunction(sys, **kw)
1089 try:
-> 1090 from slycot import tb04ad
1091 if len(kw):
ImportError: cannot import name 'tb04ad'
During handling of the above exception, another exception occurred:
TypeError Traceback (most recent call last)
<ipython-input-8-2b014ac15956> in <module>()
----> 1 control.ss2tf(Model)
~\Anaconda3\lib\site-packages\control\xferfcn.py in ss2tf(*args)
1315 sys = args[0]
1316 if isinstance(sys, StateSpace):
-> 1317 return _convertToTransferFunction(sys)
1318 else:
1319 raise TypeError("ss2tf(sys): sys must be a StateSpace object. It \
~\Anaconda3\lib\site-packages\control\xferfcn.py in _convertToTransferFunction(sys, **kw)
1113 # If slycot is not available, use signal.lti (SISO only)
1114 if (sys.inputs != 1 or sys.outputs != 1):
-> 1115 raise TypeError("No support for MIMO without slycot")
1116
1117 # Do the conversion using sp.signal.ss2tf
TypeError: No support for MIMO without slycot
When I try to import slycot in Python, I get the following result:
>>> import slycot
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Wian\Anaconda3\lib\site-packages\slycot\__init__.py", line 18, in <module>
from .analysis import ab01nd,ab05md,ab05nd,ab07nd,ab08nd, \
File "C:\Users\Wian\Anaconda3\lib\site-packages\slycot\analysis.py", line 21, in <module>
from . import _wrapper
ImportError: DLL load failed: The specified module could not be found.
There is a _wrapper.pyd file in the Slycot directory (under Anaconda3\Libs\site-packages).
This is where I am currently stuck, and I cannot get Slycot to import correctly.
Your help is greatly appreciated!