I am installing the opencv in my system followings the command given by open cv http://docs.opencv.org/2.4/doc/tutorials/introduction/ios_install/ios_install.html
I am getting this error Please let me know what I am missing.
anil-Mac-2s-Mac-mini:opencv pws-mac-2$ python platforms/ios/build_framework.py ios
Executing: ['cmake', '-GXcode', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_TOOLCHAIN_FILE=/Users/pws-mac-2/Desktop/opencv/platforms/ios/cmake/Toolchains/Toolchain-iPhoneOS_Xcode.cmake', '-DCMAKE_INSTALL_PREFIX=install', '-DENABLE_NEON=ON', '/Users/pws-mac-2/Desktop/opencv', '-DCMAKE_C_FLAGS=-fembed-bitcode', '-DCMAKE_CXX_FLAGS=-fembed-bitcode'] in /Users/pws-mac-2/Desktop/opencv/ios/build/armv7-iPhoneOS
============================================================
ERROR: [Errno 2] No such file or directory
============================================================
Traceback (most recent call last):
File "platforms/ios/build_framework.py", line 183, in <module>
b.build(args.out)
File "platforms/ios/build_framework.py", line 87, in build
self.buildOne(t[0], t[1], mainBD, cmake_flags)
File "platforms/ios/build_framework.py", line 105, in buildOne
execute(cmakecmd, cwd = builddir)
File "platforms/ios/build_framework.py", line 34, in execute
retcode = check_call(cmd, cwd = cwd)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 535, in check_call
retcode = call(*popenargs, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 522, in call
return Popen(*popenargs, **kwargs).wait()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I am getting this error Please let me know how to resolve . . .
This error happens because cmake is either (a) not installed or (b) not on the user's path.
In this case, the OP had downloaded the cmake gui application from cmake.org, and copied it to /Applications. This app doesn't add the path to the binaries automatically, which is why the script couldn't find cmake.
By adding the path to the cmake binaries (bash syntax):
PATH=$PATH:/Applications/CMake.app/Contents/bin
the OP was able to successfully build opencv.
Most package managers - e.g. homebrew or macports whould have automatically added a path to the user's profile that would have permitted it to run without having to modify the path any more.
You may need to install CMake
My-Mac: opencv$ brew install cmake
Related
I keep getting this error when trying to pip install ipython on my Windows. pip worked for pandas and other libs.
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\\Users\\Me\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python37\\site-packages\\jedi\\third_party\\typeshed\\third_party\\2and3\\requests\\packages\\urllib3\\packages\\ssl_match_hostname\\_implementation.pyi'
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.1473.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_internal\commands\install.py", line 407, in run
use_user_site=options.use_user_site,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.1473.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_internal\req\__init__.py", line 58, in install_given_reqs
**kwargs
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.1473.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_internal\req\req_install.py", line 928, in install
use_user_site=use_user_site, pycompile=pycompile,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.1473.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_internal\req\req_install.py", line 461, in move_wheel_files
warn_script_location=warn_script_location,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.1473.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_internal\wheel.py", line 432, in move_wheel_files
clobber(source, lib_dir, True)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.1473.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_internal\wheel.py", line 410, in clobber
shutil.copyfile(srcfile, destfile)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.1473.0_x64__qbz5n2kfra8p0\lib\shutil.py", line 121, in copyfile
with open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\My User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python37\\site-packages\\jedi\\third_party\\typeshed\\third_party\\2and3\\requests\\packages\\urllib3\\packages\\ssl_match_hostname\\_implementation.pyi'```
I had similar issue. I changed the registry key "Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled" to 1.
I had the same problem. For me it was, that the file path was too long. Rename things (for example the PythonSoftwareFoundation.Python.3.7_3.7.1473.0_x64__qbz5n2kfra8p0 stuff) to shorten the path.
The Windows Python installer allows you to change the maximum path length at install or upgrade and this will fix the problem. You can also lookup change maximum path length Win 10 to find out how to change the registry.
OSX 10.14 (Mojave)
python 2.7
py2app version = most recent as of Feb 11th 2019
I follow the official instructions found here:
https://py2app.readthedocs.io/en/latest/tutorial.html
I'm trying to get it to make a standalone for a 'hello world' program.
Everything works until the last step, which is 'python setup.py py2app'. I get the following error:
"Traceback (most recent call last):
File "setup.py", line 18, in
setup_requires=['py2app'],"
I did not modify the contents of the setup.py file, so they are as follows"
#
from setuptools import setup
APP = ['appp.py']
DATA_FILES = []
OPTIONS = {}
setup(
app=APP,
data_files=DATA_FILES,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)
#
Note that prior to this last step, I did indeed run 'rm -rf build dist' as instructed.
The error that I get is:
Traceback (most recent call last):
File "setup.py", line 18, in
setup_requires=['py2app'],
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/init.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/py2app/build_app.py", line 838, in run
self._run()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/py2app/build_app.py", line 1053, in _run
self.run_normal()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/py2app/build_app.py", line 1150, in run_normal
self.process_recipes(mf, filters, flatpackages, loader_files)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/py2app/build_app.py", line 1007, in process_recipes
rval = check(self, mf)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/py2app/recipes/six.py", line 113, in check
mf.import_hook(nm, m)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/modulegraph/modulegraph.py", line 1082, in import_hook
q, tail = self._find_head_package(parent, name, level)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/modulegraph/modulegraph.py", line 1182, in _find_head_package
raise ImportError("No module named " + qname)
ImportError: No module named gdbm
I am trying to buiil Dart-VM on windows, I follow the steps as described here
https://github.com/dart-lang/sdk/wiki/Building
When I run the build.py command as below:
.\tools\build.py --mode release --arch x64 create_sdk
I get the following error:
gn gen --check in out\ReleaseX64
Traceback (most recent call last):
File "D:\ops\dart\sdk\tools\gn.py", line 436, in <module>
sys.exit(main(sys.argv))
File "D:\ops\dart\sdk\tools\gn.py", line 423, in main
results = pool.map(run_command, commands, chunksize=1)
File "C:\app\Python27\lib\multiprocessing\pool.py", line 251, in map
return self.map_async(func, iterable, chunksize).get()
File "C:\app\Python27\lib\multiprocessing\pool.py", line 567, in get
raise self._value
WindowsError: [Error 2] System cannot find file。
Tried to run GN, but it failed. Try running it manually:
$ python D:\ops\dart\sdk\tools\gn.py -m release -a x64 --os host -v
Traceback (most recent call last):
File "D:\ops\dart\sdk\tools\build.py", line 658, in <module>
sys.exit(Main())
File "D:\ops\dart\sdk\tools\build.py", line 651, in Main
mode, arch, cross_build) != 0:
File "D:\ops\dart\sdk\tools\build.py", line 491, in BuildOneConfig
args = BuildNinjaCommand(options, target, target_os, mode, arch)
File "D:\ops\dart\sdk\tools\build.py", line 473, in BuildNinjaCommand
if UseGoma(out_dir):
File "D:\ops\dart\sdk\tools\build.py", line 431, in UseGoma
return 'use_goma = true' in open(args_gn, 'r').read()
IOError: [Errno 2] No such file or directory: 'out\\ReleaseX64\\args.gn'
It seems missing the args.gn file in out\ReleaseX64 folder. but I cannot find args.gn in Dart source folders. Is it generated during building process? whether I do wrong steps led to no such file generated?
I am trying to run a tutorial for PyLaTeX in Python 3.5. I am using Anaconda / Spyder. When it runs the command "generate_pdf()", [WinError 2] is generated. Below is the code (it is note quoting properly) and the error. It may be easier simply to look at the link.
def fill_document(doc):
with doc.create(Section('A section')):
doc.append('Some regular text and some ')
doc.append(italic('italic text. '))
with doc.create(Subsection('A subsection')):
doc.append('Also some crazy characters: $&#{}')
if __name__ == '__main__':
# Basic document
doc = Document('basic')
fill_document(doc)
doc.generate_pdf(filepath = r'C:\Users\James\Documents\Important Files\Python Scripts\PyLaTeX',clean_tex=False)
Error:
Traceback (most recent call last):
File "<ipython-input-14-0158fa80c4f1>", line 1, in <module>
runfile('C:/Users/James/Documents/Important Files/Python Scripts/PyLaTeX/basic_tutorial.py',
wdir='C:/Users/James/Documents/Important Files/Python
Scripts/PyLaTeX')
File
"C:\Users\James\Anaconda3\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py",
line 714, in runfile
execfile(filename, namespace)
File
"C:\Users\James\Anaconda3\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py",
line 89, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/James/Documents/Important Files/Python
Scripts/PyLaTeX/basic_tutorial.py", line 21, in <module>
doc.generate_pdf(filepath = r'C:\Users\James\Documents\Important Files\Python Scripts\PyLaTeX',clean_tex=False)
File
"C:\Users\James\Anaconda3\lib\site-packages\pylatex\document.py", line
203, in generate_pdf
raise(os_error)
File
"C:\Users\James\Anaconda3\lib\site-packages\pylatex\document.py", line
157, in generate_pdf
stderr=subprocess.STDOUT)
File "C:\Users\James\Anaconda3\lib\subprocess.py", line 629, in
check_output
**kwargs).stdout
File "C:\Users\James\Anaconda3\lib\subprocess.py", line 696, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Users\James\Anaconda3\lib\subprocess.py", line 950, in
__init__
restore_signals, start_new_session)
File "C:\Users\James\Anaconda3\lib\subprocess.py", line 1220, in
_execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file
specified
Thanks in advance.
I also had the exact same problem, but there was a .log file present in the directory. So I checked out the log, and the last few lines said that a package called lastpage.sty was not found (I'm on Linux), so I just downloaded all the latex packages again using apt.
So I think, you should read the log file too, and if there IS something like that, then go to ctan (all packages are found there) and install the required package for Windows.
Hope it helped.
Also try putting the document.generate_tex() before the document.generate_pdf(filepath="path/to/file", clean_tex=False)
I got some error message after the command :
curl -sk https://cloud.github.com/downloads/square/PonyDebugger/bootstrap-ponyd.py | \
python - --ponyd-symlink=/usr/local/bin/ponyd ~/Library/PonyDebugger
this is my termial tell me,
Overwriting /Users/hokila/Library/PonyDebugger/lib/python2.7/orig-prefix.txt with new content
New python executable in /Users/hokila/Library/PonyDebugger/bin/python
Traceback (most recent call last):
File "<stdin>", line 2462, in <module>
File "<stdin>", line 944, in main
File "<stdin>", line 1045, in create_environment
File "<stdin>", line 1361, in install_python
File "<stdin>", line 435, in copyfile
File "<stdin>", line 412, in copyfileordir
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 128, in copy2
copyfile(src, dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 83, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 2] No such file or directory: '/Users/hokila/Library/PonyDebugger/.Python'
It seems the python version error,so I update my python to 2.7.3.
then I still got the same error.How could I solve this?
This problem also occured to me and I was almost desperate. I reinstalled Python 2.7.2 and it worked fine.
I tried to solve this problem manually before using the instructions in README_ponyd.rst and I was also partially successful:
Development installation ````````````````````````
If you already have PonyDebugger git repo checked out you can can set
up a virtualenv manually and have your ponyd installation point to
your existing checkout. For demonstration we assume $VENV is set
to your intended install path and $PONYDEBUGGER_PATH is set to
your PonyDebugger git checkout::
# if you don't already have virtualenv installed
sudo easy_install
virtualenv
virtualenv "$VENV"
source "$VENV/bin/activate"
pip install -e "$PONYDEBUGGER_PATH"
# to ensure your shell knows ponyd exists hash -r
To run this ponyd you can either activate your environment by source
"$VENV/bin/activate" and ponyd will be added to your path. You
can also just call it directly via $VENV/bin/ponyd without
activating first.
You should install virtualenv before. You can try combination of both steps. Hope it helps...