I was trying to install opencv for python using this link. After running the Cmake command, it exited with errors stating C++11 is not supported Although I have Xcode installed. I Also tried forcing Cmake to use C++ 11 using $ set(CMAKE_CXX_STANDARD 11) (because my Cmake version is 3.10.2), but I got this error:
syntax error near unexpected token `CMAKE_CXX_STANDARD'
Moreover, I tried installing gcc to check if my system supports the C++ 11 compiler through this link, where again I ran into terminal errors stating ./fixincludes: No such file or directory after running $ make install . What should I do?
Adrian has a more recent blog post on compiling OpenCV for the macOS. The instructions work both for 3.3.0 and 3.3.1.
First open python by python2 or python3 command in terminal after type import cv2 and everything is right now.
Related
I am setting up boost-python for the python bindings of a library. Previously, boost was installed but linked against python2.7. After some tribulations, everything from the previous boost install is gone and I am trying to install a fresh boost.
I am using Linux Mint for the record, and Anaconda with python 3.6.8.
It works correctly in the CLI : python --version gives 3.6.8
I then begin to follow the instructions for building boost : https://www.boost.org/users/history/version_1_69_0.html
What I got from other threads is to do this :
sudo apt-get install python3-dev
I am not sure I am supposed to since I have anaconda3 but anyway, I did it.
./bootstrap.sh
here the file project-config.jam is created and the line about python says :
using python : 3.6 : /home/myUser/anaconda3 ;
I then proceed to build with b2 :
sudo ./b2 --with-python -j8 install
the installation fails with literally a wall of text full of these :
./boost/python/detail/wrap_python.hpp:50:11: fatal error:
pyconfig.h: No such file or directory
# include <pyconfig.h>
^~~~~~~~~~~~
compilation terminated.
When I search inside ~/anaconda3/include/python3.6m the file pyconfig.h sits there as expected
Is there additional information I should give to b2 or bootstrap ?
I face the same problem for installing boost 1.70 and Anaconda3 with python Anaconda with python 3.7.1. I found an answer based on this question.
Ubuntu - Linking boost.python - Fatal error: pyconfig cannot be found
By the way to solve this problem first you should find the "pyconfig.h" file in the installation directory of Anaconda. For me it's in "~/anaconda3/include/python3.7m". Then export this address or just add this address to the .bashrc file.
export CPLUS_INCLUDE_PATH="$CPLUS_INCLUDE_PATH:path/to/your/Anaconda3/include/python3.7m"
Put the address to Anaconda in your pc instead of path/to/your/Anaconda3. Remember to restart the terminal after this. Then again just run "./b2" in the boost folder. It should compile the rest.
I have a CentOS 7.4 GPU machine.
I tried to install cntk in the machine. I cannot use the pip files as they are for ubuntu (I tried to install with them and get seg fault when I import cntk).
I compiled the cloned cntk successfully. However I when I try to get the python version, I run into troubles. I did
sudo python setup.py install
in $cntk_root/bindings/python
and get
building '_cntk_py' extension
swigging cntk/cntk_py.i to cntk/cntk_py_wrap.cpp
swig -python -c++ -D_MSC_VER -I../../Source/CNTKv2LibraryDll/API -I../../bindings/common -Werror -threads -o cntk/cntk_py_wrap.cpp cntk/cntk_py.i
cntk/cntk_py.i:92: Error: Syntax error in input(1).
error: command 'swig' failed with exit status 1
It must be simpler than this. Suggestions?
I can't help with your above problem but if you relax the constrain of not using Conda and follow these instructions I can say that it will work since I did it a few weeks ago on RHEL 7 using the cntk release 2.2.
Note, release 2.2 assumes that /var/lock is writable which is not true for me. If you follow the instructions above you need to open CrossProcessMutex.h and replace /var/lock/ by a writable directory.
Problem
I am trying to install both plotly and cufflinks. However I had a problem.
The installation of both plotly and cufflinks were successful. Although, I can't import cufflinks.
Below is a picture of the problem. It seems to be a dependency error:
I tried manually downloading and installing "talib" but I keep getting failures. (Shown below).
talib\common.c(240): fatal error C1083: Cannot open include file: 'ta_libc.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
Any Ideas? I tried re-installing both modules and Anaconda. Nothing So far.
Other infos:
Cufflinks version: 0.11.0
Plotly version: 2.0.10
Anaconda version: 3-4.4.0 (But I don't think it have anything to do with it)
Python version: 3.6.1
try installing this version of cufflinks, it eliminated the error for me.
pip install cufflinks==0.8.2
From this link: github.com/mrjbq7/ta-lib#troubleshooting
Troubleshooting
Sometimes installation will produce build errors like this:
func.c:256:28: fatal error: ta-lib/ta_libc.h: No such file or directory
compilation terminated.
This typically means that it can't find the underlying TA-Lib library, a dependency which needs to be installed. On Windows, this could be caused by installing the 32-bit binary distribution of the underlying TA-Lib library, but trying to use it with 64-bit Python.
Windows
Download ta-lib-0.4.0-msvc.zip and unzip to C:\ta-lib
This is a 32-bit release. If you want to use 64-bit Python, you will need to build a 64-bit version of the library.
My Fix
So, for windows, we need a 64-bit version of the library? Luckly I found a lot of modules built for 32 and 64 bits python:
http://www.lfd.uci.edu/~gohlke/pythonlibs/
search for "ta-lib" and click on the module you need (In my case cp36 64 bits).
Then, open the command prompt.
Change to where you downloaded the file: cd path/to/file
Type: pip install NameOfFile (in my case pip install TA_Lib‑0.4.10‑cp36‑cp36m‑win_amd64.whl )
Now the 64-bits Ta-Lib module should be installed in your machine. I tested the previous line of codes and it worked!
Thanks for the help :)
I have now removed all dependencies on talib. All studies are pure python based now and you should not face any of this errors.
I followed instructions as given here
I installed python 3.4.3, then installed zlib and finally executed python setup.py install after downloading extracting the yowsup from hereenter link description here
and changed directory to yowsup-master.
But I get this error:
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: build\
temp.win-amd64-3.4\Release\curve25519module.o: bad reloc address 0x14 in section
`.data'
collect2.exe: error: ld returned 1 exit status
error: command 'C:\\MinGW\\bin\\gcc.exe' failed with exit status 1
Then since above did not work, I tried using pip install yowsup2 but I get the same error.
Could anyone get round this error?
I am not into python, so not able to tell why is this error happening.
I am on windows 8.1 64 bit.
There are few things which don't let you import that yowsup module in windows even in windows 10. so i have managed to install that in linux os (i am using kali linux) i have tryed to download and install the visual c++ build tool but that is just waste of time and data.
So Better switch to a Cloud like heroku or sitch to linux (vm or duel boot)
I have the latest Anaconda Python distribution installed on Windows 8 and I am attempting to install the rpy2 package. I initially ran into several issues that I was able to circumvent but I'm now stuck on one particular error that I'm pasting below.
The command
pip install rpy2
exits with the following error message:
In file included from .\rpy\rinterface\_rinterface.c:58:0:
.\rpy\rinterface\_rinterface.h:8:15: fatal error: R.h: No such file or
directory
compilation terminated.
error: command 'gcc' failed with exit status 1
Any suggestions? The path to R.h is included on my environment.
Dr. Gohlke's binary is probably the easiest solution. But you need to change the Python installation path in your registry for this method to work. The relevant key is in HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.7\InstallPath. Change it so that the anaconda Python is the default python installation. You can always change it back if you want.