ponydebugger error when installing - ios

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...

Related

EnvironmentError when pip installing ipython

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.

How can I fix this error and ingest data from Quandl? Thank you

When I try to run the command in my terminal, it raises an error
I'm using anaconda to install my packages and python 2.7.
$ zipline ingest -b quandl
Traceback (most recent call last):
File "/anaconda3/bin/zipline", line 6, in <module>
from pkg_resources import load_entry_point
File "/anaconda3/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3241, in <module>
#_call_aside
File "/anaconda3/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3225, in _call_aside
f(*args, **kwargs)
File "/anaconda3/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3254, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/anaconda3/lib/python2.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master
ws.require(__requires__)
File "/anaconda3/lib/python2.7/site-packages/pkg_resources/__init__.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
File "/anaconda3/lib/python2.7/site-packages/pkg_resources/__init__.py", line 786, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'mock>=2.0' distribution was not found and is required by tables
It seems you need to install the mock package:
conda install mock
or, if the previous doesn't work:
conda install -c conda-forge mock

Kivy Buildozer VM sh.ErrorReturnCode_127 error

I am trying to build a simple Python program to an APK with Buildozer on the Kivy Virtual Machine. Every time I run buildozer android debug, I get the following error
pid 2134:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/local/lib/python2.7/dist-packages/sh.py", line 1540, in wrap
fn(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/sh.py", line 2459, in background_thread
handle_exit_code(exit_code)
File "/usr/local/lib/python2.7/dist-packages/sh.py", line 2157, in fn
return self.command.handle_command_exit_code(exit_code)
File "/usr/local/lib/python2.7/dist-packages/sh.py", line 815, in handle_command_exit_code
raise exc
ErrorReturnCode_127:
RAN: /home/kivy/Desktop/Projects/Kivy_Test/.buildozer/android/platform /build/build/other_builds/libffi/armeabi-v7a__ndk_target_21/libffi/autogen.sh
STDOUT:
/home/kivy/Desktop/Projects/Kivy_Test/.buildozer/android/platform/build /build/other_builds/libffi/armeabi-v7a__ndk_target_21/libffi/autogen.sh: 2: exec: autoreconf: not found
STDERR:
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/kivy/Desktop/Projects/Kivy_Test/.buildozer/android/platform /python-for-android/pythonforandroid/toolchain.py", line 1073, in <module>
main()
File "/home/kivy/Desktop/Projects/Kivy_Test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1067, in main
ToolchainCL()
File "/home/kivy/Desktop/Projects/Kivy_Test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 576, in __init__
getattr(self, args.subparser_name.replace('-', '_'))(args)
File "/home/kivy/Desktop/Projects/Kivy_Test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 151, in wrapper_func
build_dist_from_args(ctx, dist, args)
File "/home/kivy/Desktop/Projects/Kivy_Test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 200, in build_dist_from_args
build_recipes(build_order, python_modules, ctx)
File "pythonforandroid/build.py", line 562, in build_recipes
File "/home/kivy/Desktop/Projects/Kivy_Test/.buildozer/android/platform/python-for-android/pythonforandroid/recipes/libffi/__init__.py", line 33, in build_arch
shprint(sh.Command('./autogen.sh'), _env=env)
File "pythonforandroid/logger.py", line 178, in shprint
File "/usr/local/lib/python2.7/dist-packages/sh.py", line 863, in next
self.wait()
File "/usr/local/lib/python2.7/dist-packages/sh.py", line 792, in wait
self.handle_command_exit_code(exit_code)
File "/usr/local/lib/python2.7/dist-packages/sh.py", line 815, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_127:
RAN: /home/kivy/Desktop/Projects/Kivy_Test/.buildozer/android/platform/build/build/other_builds/libffi/armeabi-v7a__ndk_target_21/libffi/autogen.sh
STDOUT:
/home/kivy/Desktop/Projects/Kivy_Test/.buildozer/android/platform/build /build/other_builds/libffi/armeabi-v7a__ndk_target_21/libffi/autogen.sh: 2: exec: autoreconf: not found
STDERR:
# Command failed: /usr/bin/python -m pythonforandroid.toolchain create --dist_name=kivytest --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/kivy/Desktop /Projects/Kivy_Test/.buildozer/android/platform/build" --ndk-api=21
#
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2
Note: my log_level in my buildozer.spec is 2. I have tried to install some dependencies, but the Kivy VM does not let me for whatever reason. If anyone could help me out, that would be great!
I had the same issue and in my case i was missing the following system dependencies that are require for python-for-android as described in the file:python-for-android file
The dependencies i was missing:
automake
autoconf
libltdl-dev
I found that solution in the Github forum of Buildozer:
Github Question
So you are probably missing some dependencies as well.
For me running the following commands worked perfectly:
sudo apt-get install automake
sudo apt-get install autoconf
sudo apt-get install libltdl-dev
I am running macOS 10.14 with Python 3.7. I hit similar issues with buildozer and searched for answers here, in buildozer/kivy github, google groups, etc. All answers start with buildozer works on Linux. For macOS apt-get is not directly supported -- Fink is a 3rd party port. However, Homebrew is well supported on macOS. To resolve buildozer issues I used brew to install the required packages. Specifically
$ brew install automake
$ brew install autoconfig
$ brew install libtool
Resulting 'buildozer -v android debug' was successful

cannot install virtual python environment

I am trying to install and use opencv with Python 3 via Homebrew in macOS Sierra. I followed the steps from this tutorial, but after typing the command pip install virtualenv virtualenvwrapper I get the exception shown below.
When I first tried to install the virtual environment it said it couldn’t find pip. I used sudo easy_install pip and typed again the required command-line.
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_set.py", line 784, in install
**kwargs
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 345, in move_wheel_files
clobber(source, lib_dir, True)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 323, in clobber
shutil.copyfile(srcfile, destfile)
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 13] Permission denied: '/Library/Python/2.7/site-packages/virtualenv.py'
but after using pip install --user virtualenv virtualenvwrapper it went fine. but after updating the source as given here and source it I get the following -bash: /usr/local/bin/virtualenvwrapper.sh: No such file or directory
even after I close the terminal and reopen it in the second line, I see
-bash: /usr/local/bin/virtualenvwrapper.sh: No such file or directory
please help me :(
This is a permission issue. As outlined here, you should use the --user option:
pip install --user virtualenv virtualenvwrapper

OPEN CV iOS installation

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

Resources