ImportError: No module named _csv . Qpython for android logs - importerror

I put goog_appengine inside android located at /mnt/sdcard
I also put wsgiref folder at same location.
from Qpython I manage to "send control key" + "d"
I got sh $
I put command like the ff:
"$python /mnt/sdcard/google_appengine/appcfg.py"
But Igot ImportError: no module _csv
I feel putting these is not same architecture " /usr/lib/python2.7/lib-dynload/_csv.x86_64-linux-gnu.so"
That come from ubuntu 13.04.
What to do next, Where I can find _csv module for Qpython+android_version.
Is it possible to upload my code through android?

You can install _csv from QPython's system. ( You can find system icon in qpython's new version 0.9.6.2 )

To install _csv or any other module, follow these steps. Here's what I did to install websocket (and all of its dependencies):
To install websocket on the phone:
Start QPython
Click the big button
Select “run local script”
Select “pip_console.py”
Type “pip install websocket”

Related

Flutterfire configure error attempting to run a command

I have installed Firebase CLI, but when I run flutterfire configure in my app folder, I get the following error:
FirebaseCommandException: An error occured on the Firebase CLI when attempting to run a command.
COMMAND: firebase --version
ERROR: The FlutterFire CLI currently requires the official Firebase CLI to also be installed, see https://firebase.google.com/docs/cli#install_the_firebase_cli for how to install it.
Is there anything I'm missing?
First, run the command "dart pub global activate flutterfire_cli". After running the command "dart pub global activate flutterfire_cli" you should get a warning message, you just need to add the path to the path variable. Go to the Finder in your Mac. Select "Go->Home" at the top. Inside the home page, use the keyboard shortcut (Command + Shift + .(period)) to show hidden files. Then, look for the file .zshrc. Add the path from the warning message in the zshrc file, it should look like this: export PATH="$PATH":"$HOME/.pub-cache/bin"

There was a path error when Ubuntu created AVD via avdmanager

I used the command line tools provided by Android to download the SDK tools.Use the command avdmanager create avd -n nexus5_23 -k "system-images;android-23;google_apis;x86_64" --device "Nexus 5" to create the emulator, I found that the mirror path in the file config.ini was image.sysdir.1=sdk/system-images/android-23/google_apis/x86_64/.
Compared with the emulator path created by Win10, the emulator can be started normally after changing it to image.sysdir.1=system-images/android-23/google_apis/x86_64/.
I can't find a solution to this problem in Google.Can you give me some Suggestions? thank you.
The environment:
Ubuntu 16.04 Server
bash.rc
...
export REPO_OS_OVERRIDE=linux
# ANDROID SDK
export ANDROID_HOME=/home/yaorc/android/sdk
export ANDROID_SDK_ROOT=/home/yaorc/android/sdk
export PATH=$PATH:${ANDROID_HOME}/emulator
export PATH=$PATH:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin
export PATH=$PATH:${ANDROID_HOME}/platform-tools
export PATH=$PATH:${ANDROID_HOME}/build-tools/29.0.3
export PATH=$PATH:${ANDROID_HOME}/platforms/android-29
I found the answer after several attempts.
Because my command-line tools are in the SDK root,This causes the system image path to be confused when the avdmanager creates the AVD.
Solution:
I created the cmdline directory in the SDK root, cut the tools folder into the cmdline, and modified the environment variable file to properly create and start avd.

Trying to install SDL Perl on Windows 10, problems with "make" (and "dmake" and "gmake")

I am using Windows 10 and Strawberry Perl. I found this nice tutorial on building a 3D engine in Perl. Which requires SDL. For a couple of days I've been trying to install it, but it doesn't work. First I tried via CPAN, no success. No I am trying manually, but I am getting error messages when using "make". If I type "perl -V:make" it says I should use "dmake". If I do so, there's a dmake warning, telling me to use gmake instead. If I do that, there's the following message:
"to undefined at C:/Perl64/site/lib/ExtUtils/Install.pm line 1199. gmake: *** [Makefile:942: pm_to_blib] Error 2"
Any suggestions how to fix this? Or is there an easy (easier) way to install SDL?
It seems like the Perl SDL module uses SDL version 1.2.14, whereas the documentation says
The best course of action is to move to SDL 2.0 or later as quickly as
possible
So, I would recommend looking at the Python bindings PySDL2 instead. The following worked for me on Windows 10:
Downloaded Python 3.8 from here:
https://www.python.org/ftp/python/3.8.2/python-3.8.2-amd64.exe
Then added the following to the User enviroment variables for "Path" (NOTE: at the beginning, not at the end):
%USERPROFILE%\AppData\Local\Programs\Python\Python38
%USERPROFILE%\AppData\Local\Programs\Python\Python38\Scripts
Then, from the command prompt install pysdl2:
>pip install pysdl2
Collecting pysdl2
Downloading https://files.pythonhosted.org/packages/60/ba/ddb48261848874eeb3d54963edbf3c74fff86499746aeb23151f123953bb/PySDL2-0.9.7-py3-none-any.whl (541kB)
|████████████████████████████████| 542kB 2.2MB/s
Installing collected packages: pysdl2
Successfully installed pysdl2-0.9.7
>pip install pysdl2-dll
Collecting pysdl2-dll
Downloading https://files.pythonhosted.org/packages/01/37/f9aa5472fb85ce94507c69110916133ad29b650d2bf277de2cce37d7ad7d/pysdl2_dll-2.0.12-py2.py3-none-win_amd64.whl (2.5MB)
|████████████████████████████████| 2.5MB 3.2MB/s
Installing collected packages: pysdl2-dll
Successfully installed pysdl2-dll-2.0.12
Then, add a new User environment variable PYTHONPATH with value:
%USERPROFILE%\AppData\Local\Programs\Python\Python38\Lib\site-packages
Close the command prompt, and reopen a new one to update the environment variables. Then I created a test Python script:
import sys
import sdl2.ext
resource_dir=r'C:\Users\hakon\AppData\Local\Programs\Python\Python38\Lib\site-packages\sdl2\examples'
RESOURCES = sdl2.ext.Resources(resource_dir, "resources")
sdl2.ext.init()
window = sdl2.ext.Window("Hello World!", size=(640, 480))
window.show()
factory = sdl2.ext.SpriteFactory(sdl2.ext.SOFTWARE)
sprite = factory.from_image(RESOURCES.get_path("hello.bmp"))
spriterenderer = factory.create_sprite_render_system(window)
spriterenderer.render(sprite)
processor = sdl2.ext.TestEventProcessor()
processor.run(window)
sdl2.ext.quit()
and finally run it from the command prompt:
> python test.py

"ERROR : No emulator images (avds) found" running ionic on osx 10.10

This is the full error message I got after running ionic emulate android
*running cordova emulate android
Running command: /Users/DeadLift/Documents/ionic/myApp/hooks/after_prepare/010_add_platform_class.js /Users/DeadLift/Documents/ionic/myApp
add to body class: platform-android
Running command: /Users/DeadLift/Documents/ionic/myApp/platforms/android/cordova/run --emulator
ANDROID_HOME=/usr/local/Cellar/android-sdk/24.1.2
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home
/Users/DeadLift/Documents/ionic/myApp/platforms/android/cordova /node_modules/q/q.js:126
throw e;
^
ERROR : No emulator images (avds) found.
1. Download desired System Image by running: /usr/local/Cellar/android-sdk/24.1.2/bin/android sdk
2. Create an AVD by running: /usr/local/Cellar/android-sdk/24.1.2/bin/android avd
HINT: For a faster emulator, use an Intel System Image and install the HAXM device driver
Error: /Users/DeadLift/Documents/ionic/myApp/platforms/android/cordova/run: Command failed with exit code 1
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23) *emphasized text*
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)*
I follow all the above by creating an avd and it give me the same message again.
Thanks.
Vikas's answer is pretty spot on, however (sometimes) just running android avd won't work, which is what I found out after hours of trying to get it working.
When ever I ran android avd in my terminal it would give me the following error:
zsh: command not found: android
This is because I needed to add the Android SDK paths for the platform-tools and tools to my zshrc file (you might be running bash or something else on your terminal).
Simple fix was to add these files to my zshrc PATH environment, You can do this too by using your favourite text editor and depending on what shell you're using.
This link: http://docs.phonegap.com/en/2.8.0/guide_getting-started_android_index.md.html#Getting%20Started%20with%20Android helped me out a hell of a lot getting this fixed.
So I used subl ~/.zshrc (because sublime is my text editor and i've setup symlinks)
I Found my exports PATH and changed it to represent the following:
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/dev/.rbenv/versions/2.2.3/bin/ruby:/Users/dev/Library/Android/sdk/platform-tools:/Users/dev/Library/Android/sdk/tools:$PATH"
I then saved the file, closed down sublime and ran source ~/.zshrc in my terminal window, and now I can run android avd and it now opens the Android Virtual Device Manager with no problems.
A reminder your shell might be different to mine (i.e. not running with zsh)and your exports PATH might look different as well, but it's pretty easy to figure out, and the link above will also help if you get stuck.
Actually it is not able to find AVD (Android virtual device). You have to create one.
Type "android avd" from Command Promt to use the graphical manager to setup an emulator image to work with for running your app on. The graphical tool is fairly straight forward to use.

rj not installing for eclipse/R Statet

I realize there are several posts on this, so apologies if I'm breaching etiquette. In my case, I've tried several of them, and I just can't seem to get the rj issue (of having it installed properly) resolved.
I tried the CMD INSTALL recommendation and literally copied the tar file to my R executable directory
R CMD INSTALL --no-test-load rj_*.tar.gz
I used a DOS cmd window to run it, and it failed using the * notation, so I substituted the exact rj tar file name by navigating to the path...
C:\Program Files\R\R-2.12.1\bin\x64\rj_0.5.0-5.tar.gz
and running
R CMD INSTALL --no-test-load rj_0.5.0-5.tar.gz
This seemed to work as R shows all Java packages installed (inc. Rjava)
> ("rj" %in% installed.packages()[,"Package"])
[1] TRUE
> ("rJava" %in% installed.packages()[,"Package"])
[1] TRUE
>
Yet, in the eclipse environment, I'm still getting rj missing error.
Any thoughts on what to try next? I really want to get the debug capability to work here and pulling my hair out over this.
Oh, and also even though it shows installed in R. If I try to launch inside R, I get:
> library(rj)
Error : .onLoad failed in loadNamespace() for 'rj', details:
call: .jcall("de/walware/rj/server/RJ", "Lde/walware/rj/server/RJ;",
error: RcallMethod: cannot determine object class
Error: package/namespace load failed for 'rj'
Using Eclipse SDK Version: 3.8.0
StatET 3.01.02
rj_0.5.0-5