qpython not able to download requests module - qpython

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.

Related

ModuleNotFoundError: no module named 'transformers'

this is my first post and I am very new to coding so please let me know if you need more information. I have been running some AI to generate artwork and it has been working but when I reloaded it the script won't work and it is now saying "No module named 'transformers'". Can anyone help me out? It was when I upgraded to google colab pro that I started to encounter issues although I am not sure why that would make a difference
ModuleNotFoundError
Probably it is because you have not installed in your (new, since you've upgraded to colabs pro) session the library transformers. Try to run as first cell the following: !pip install transformers (the "!" at the beginning of the instruction is needed to go into "terminal mode" ). This will download the transformers package into the session's environment.
assuming you are referring to the module here: https://pypi.org/project/transformers/
you need to install transformers with pip
after you install transformers, make sure to import it , and import the Module youre gonna use

Is there a way to use create-react-app offline

I would like to know if there's a way to use create-react-app offline rather than have it download files from the internet everytime. Doing this, seems like a huge waste of bandwith, and time, as internet speed is very slow and expensive where i reside.
Now there is an NPM package for that it called create-react-app-offline
Installation :
npm i - g create-react-app-offline
Usage :
crao -n <app-name>
For more informations on GitHub
Every-time you do npm i, it also checks for updated packages and updates your package.json . The app can be made offline but your node modules will be downloaded ( they are added to git ignore) if you upload them to git.
If net is really an issue there then I'd suggest getting a pen drive or something where you can upload your files and access them without re-downloading
I found a npm package called create-react-app-offline which initializes the react project offline. And I checked it myself.
Here's the link
Create React App Offline Package
Just install it globally and run the crao -n <app_name>

Why do I need to install node.js and git to learn AngularJS?

I am presently reading Manning's AngularJS in Action by Lukas Ruebbelke
The introductory part suggests,
Because you’re pulling files from a CDN, you’ll need to run
Angello Lite(the application name) from a web server. There are a few ways to do this, but one of the easiest ways is to use the npm package serve.
The steps for installing Angello Lite are as follows:
■ Install Node.js. You can find all of the information to do that at http://
nodejs.org/.
■ Install the serve package by running npm install -g serve from the command
line.
■ Download Angello Lite from GitHub, using the URL given above, and place it
on your local machine in a directory named angello-lite.
■ Navigate to the angello-lite directory from the command line and run serve.
■ Go to http://localhost:3000 in your browser to see the application.
Does learning Angular JS require previous exposure to node and git?
If I have Apache Tomcat already configured on my local m/c, what is the procedure to start with it?
Furthermore, just to keep in sync with the author, I installed git and then cloned a dir onto my local m/c from github.
Then i install node.js and Install the serve package by runningnpm install -g servefrom the command line.
Unfortunately when i navigate to the angello-lite directory from the command line and run serve, it shows me
where angello-lite is the repository where the application resides?
Any suggestions on how to configure successfully?
I have no idea regarding node.js and git. Do i really need to learn
these to begin with AngularJS then.
No, that's not a requirement. You don't even need a web server. You can have your static HTML files locally or use some online service like plnkr. Obviously if you need to work with dynamic data then you will need a web server. At some point you might want to start making AJAX calls in order to fetch some dynamic data from your server backend.
If I have Apache Tomcat already configured on my local m/c, what is
the procedure to start with it?
Just add an HTML page to the root of your website, open your favorite browser and invoke this page.
You don't need those tools to learn Angular - you can download latest package from the AngularJS website (both for development and for production).
Node.js and Git may be necessary to pull and build packages from the NPM, run tasks and many more great features, but just to learn Angular all you need is its code.

jhipster bookstore tutorial - Only display the footer view at runtime

I'm trying to start using hipster. I've completed the installation and tried to recreate the same bookstore app like in the demo video.
Everything went well (installation, app creation, app startup, DB schema creation) but when I access the application in the browser, I only the text "This is your footer". I don't have the header and the body like in the demo. There is no error in the console. I assume something is wrong with AngularJS but I don't know what.
I'm on Mac OS 10.10
JDK 1.8._45
eclipse Luna (I've successfully imported the generated hipster project as a Maven project)
If you have any suggestion on where to investigate. Thanks.
Ok, the root cause was that the bower components were not properly installed.
To resolve the issue, I've done:
sudo xcodebuild -license (without agreeing with the license, it was
preventing bower to complete)
sudo bower install --allow-root (to download all the components)
Had the same problem in Google Chrome. Fixed by clearing cache and cookie.
Maybe, it`s help you too.
in my case i used a postgresql database. I changed the user password in both application-dev.xml and application-prod.xml and also on the database.
alter user myuser password 'mypassword' ;
then restarted the app with command mvn sprint-boot:run
then it worked

How to run angularjs documentation locally

I have compiled the newest angular.js and find out that links in the doc all point to absolute URL angularjs.org/.... I want to be able to read the doc locally.
You have to run a webserver ("python -m SimpleHTTPServer) to properly browse the docs.
As an alternative, you might want to try Dash for offline documentation for many APIs - http://kapeli.com/dash
"Dash" which is mentioned in another answer costs around $20.
For a free solution, check out http://devdocs.io/
Clone the angular source code in order to have access to the docs directory of all released (and yet unreleased) versions locally.
Local AngularJS API Docs
Here's how I hosted the Angular.JS documentation locally, on my Mac:
Download the zipped version of the Angular.JS Build, which contains both the builds of AngularJS, as well as documentation and other extras.
Unzip the Angular.JS docs folder.
Download and install Node.JS.
Using Mac Terminal, install the npm package http-server globally so that it can be run from the command line.
$ sudo npm install -g http-server
cd to the Angular.JS docs folder and start-up http-server.
$ http-server -a 127.0.0.1
Starting up http-server, serving ./ on: http://127.0.0.1:8080
Use your browser to view the docs # http://127.0.0.1:8080/index-production.html
Note:
Using the default served by http-server (http://0.0.0.0:8080) and http://0.0.0.0:8080/index-production.html in Chrome will end up in a google search. Alternatively you can create a bookmark and Chrome will stop searching for it.
download the lastest version of the doc, then run python -m SimpleHTTPServer, in your browser enter the following url: localhost:8000/index-production.html , it works for me.
If you want a complete local AngularJS documentation, you can clone the angular/angular.js repository on Github. The nodejs webserver is already included.
You just need to install nodejs dependencies (npm install) and build (grunt package), and you can run the local webserver with grunt webserver.
All the documentation (API, tutorials, etc ...) will be available on your computer at http://localhost:8000/build/docs
For a free and open source version of Dash, use Zeal to provide offline documentation. It's also very nice when integrated with your editor (Submlime in my case).
if you are developing a site using "localhost/your-project"
and refer the angular.js file as:
"localhost/your-project/js/angular.js"
then, you can access the docs by:
"localhost/your-project/js/docs/index.html"
For those with WampServer (or anyother *AMP application ),
Simply point your Web Browser to your offline docs ,
http://localhost/angularjs/1.5.3/docs/
it works like charm.

Resources