Pip install is too slow - qpython

Hello I am trying to install a few modules in Qpython but is really slow, I also tried using the alternative with Qpypi and its just really slow, my download rate is between 5KBs and 10KBs...
I am using a Samsung 10+
Android Version 11
QPython 3L
The modules that I am trying to download are numpy and pandas.
Here is a screenshot of the console...

Related

React Native unable to compile during npx react-native run android

Hey and good day everyone,
when I want to compile and run my react native code in the android platform, it shows up the error as pictures below (app:processDebugMainManifest FAILED)
The system that I currently use is macOS Monterey v12 with apple M1 chips.
I highly encourage you to Use EXPO project manager instead of using pure react native for development and then if you were curious you can eject from it.
Expo give you lot of power with libraries and expo client.
check it out:
https://expo.dev/

Display tqdm in AWS Sagemaker's jupyterlab

Does anyone nows how can we have python tqdm progress bar working on a Sagemaker Jupyterlab Noteook ? The tqdm progress bar is never displayed, components are displayed as their code.
Example :
HBox(children=(FloatProgress(value=0.0, max=5234.0), HTML(value='')))
I'm aware of the usual fix describe here, but It does not work since trying to executing jupyter lab build will results in the issue describe here
Many thanks.
Thanks for using Sagemaker Notebooks!
I got this working by following the instructions in your links.
Note: I had to use the Jupyter terminal instead of using a magic ! from the notebook. There was a lot of output during the installation which slowed Jupyter down too much.
So in the terminal:
jupyter labextension install #jupyter-widgets/jupyterlab-manager > /dev/null
then:
jupyter nbextension enable --py widgetsnbextension
At this point you need to reload Jupyterlab in your browser. This is because the labextension build generates a new javascript bundle that you must reload to get.
Finally in the notebook:
!pip install tqdm
and then the example worked:
import time
from tqdm import tqdm_notebook
example_iter = [1,2,3,4,5]
for rec in tqdm_notebook(example_iter):
time.sleep(.1)
Hope this helps!
You should also try in a new notebook instance to ensure you are on the latest version of Jupyterlab.

React native EXPO installation (npm start)

I created my app in react native using Expo but when i run the npm start command its showing me this:
running metro bundler on port 8081
and then
loading dependency graph, done
and never end. what to do?
Here is the complete console output.
First of all if you have a bundler like the one that you have used then it would suggest that you have used react-native init to create you application, instead of expo.
Expo bunders look like this:
If you have created a react-native init and as it suggests in your screenshot that you are building the app on a Windows machine, that means you will be developing on Android.
The instructions for using Android and running react-native are quite long and complicated, they can be found here. For the sake of brevity I am not going to repeat them here asyou can just follow this link. Make sure to choose Building Projects with Native Code -> Development OS: Windows -> Target OS: Android to find the instructions that are pertinent to your situation.
https://facebook.github.io/react-native/docs/getting-started.html
If you are planning on developing on an emulator then you will need to make sure that you have one installed (the link above has all the info that you need). Also you need to make sure that you launch your emulator before running react-native run-android if you do that then it should load on to the emulator and you should be able to see what you are developing on.
If you want to run on your own Android device then you should follow the instructions on this page https://facebook.github.io/react-native/docs/running-on-device (again choosing the options for your situation).
Expo
If this feels like too much effort, you can always try Expo. It doesn't require you to be able to deal with native code. And depending on your use case can be a better option than creating a project with react-native init, plus you can always eject from the expo project and turn it in to a full fledged react-native app.
You install the expo-cli with
npm install -g expo-cli
Then download the expo app from the App Store or the Google Play Store (depending on the mobile that you are using).
Then you can use
expo init
to create your application
Check out the expo documentation for more information https://docs.expo.io/versions/v32.0.0/workflow/up-and-running
Well, Nice question, First of all, I totally understand what's exactly your problem is, let me give you a solution in a very appropriate way.
Basically, there is two way to install and setup React Native Project on your mac and windows machines
1st React Native (native) Method: (That's basically you're using right know
Note: If you're using Apple product - Like MacBook then you can do IOS and Android both platform by using this method, if you're using Windows or Linux you can only do this part for Android platforms
In this method, we have to follow these simple steps
Download Nodejs from Offical website link here
Installing the React Native Cli
npm install -g react-native-cli
If you get an error like Cannot find module 'npmlog', try installing npm directly: curl -0 -L https://npmjs.org/install.sh | sudo sh.
(Only for mac)
Install the Xcode from Appstore (Only for Mac user/macos users)
otherwise
download and install the Android Studio (Stable version) from the official website of Android studio
Setup Xcode (Simulator) or Setup Android Studio for Android devices use (emulator)
by learn and guide from this link here
Note: Basically in your scenario, I'm pretty sure you didn't set up your emulator for android and simulator for IOS that's why you didn't see anything after
2nd React Native with Expo Method: that's you're not using a loading dependency graph
Use
For Android
react-native run-android
For IOS
react-native run-ios
2nd React Native without Expo (that's not your case):
In this method, we have to follow these simple steps
Download Nodejs from Offical website link here
installing expo cli
npm install -g expo-cli
expo init yourprojectname
cd yourprojectname
npm start
Note: Simulators and emulators way same for both

qpython not able to download requests module

I am using qpython for programming python on android.In my script I am importing requests module and so I have tp install requests module from pip.When I run pip install requests command I get the following error:
error build/lib.linux-armv71-2.7/requests/auth.py:operation not permitted qpython
I get this error twice while installing requests and so I am not being able to run my script.
You might need to manually download requests, extract and move it to your Lib/site-packages/Requests/ folder, from there python should be able to import from it. I don't see that package available for qpython, it might work out of the box or it might still need to be ported.
After installing qpython on my current device I was able to open the app, go to My QPython ->Scripts and use pip_console.py to try to install it but as you said it fails. I'm going to test later my above recommendation. My install directory is /sdcard/com.hipipal.qpyplus/lib/python2.7/site-packages/ and that is where I'm going to drop the requests library.
To run pip on qpython just use the steps below:
import pip
pip.main(['install', 'bs4'])
The above is to install bs4 for BeautifulSoup. Worked for me :)
The newest version ( 1.3.1 ) from google play has fixed this issue.
This solution did not work or me...but I did resolve it by downloading the new beta v2.1 from
https://github.com/qpython-android/qpython/releases
Google play did not give me the latest version (I had 1.xx)
I was able to use QPYPY to install requests and it automatically installed the required library urllib3.

New App Engine SDK unable to utilize / find locally installed Python Imaging Library

Yesterday I updated my google cloud SDK along with the python runtime. Now an app I was able to run locally in the SDK complains about the PIL / Python Imaging Library not being available:
bash-3.2$ dev_appserver.py . --host=0.0.0.0
INFO 2014-05-31 17:07:52,313 devappserver2.py:706] Skipping SDK update check.
WARNING 2014-05-31 17:07:52,319 api_server.py:378] Could not initialize images API; you are likely missing the Python "PIL" module.
Not true, however. I DO have PIL installed and it works swimmingly with jpegs, which is what I expect:
bash-3.2$ ipython
Python 2.7.5 (default, Mar 9 2014, 22:15:05)
In [1]: from PIL import Image
In [2]: my_image = Image.open('motorcycle.jpg')
In [3]: my_image.show()
Works just fine. FWIW, I declare my app.yaml use of PIL as such:
libraries:
...
- name: webapp2
version: latest
- name: PIL
version: latest
I've tested it, so it's not a false negative. When I try to use the GAE images module, it's blows up with the same problem. It works just fine in production. Clearly Python has what it needs to work. Why is App Engine unable to make use of it?
The problem I was having had to do with having a clash between a brew version of python installed versus the system version. Fixing my shell's path to point to the correct python installation sorted this problem, too. For GAE users: I also had to make sure my app engine SDK path was correct as well.
If you're having problems installing or getting PIL to work, understand that there are many dependencies involved with PIL, including what file format codecs you will want to support (there is a PNG library, a TIFF library and a JPEG library), and whether you want to draw text in your images and need truetype font support via the freetype library. Know that you may have PIL installed and no codec support libraries and effectively PIL won't be usable.
A good starting place for this issue might be this other question:
How to deal with Linux/Python dependencies?

Resources