Python 2.7.14 on Raspbian - python-2.7

My client has an application developed on python2.7.14, and I'm trying to run it on a raspberry.
When I run it on python2.7.9 it has some interface problems, so I installed python2.7.14 exactly as said in this link: https://tecadmin.net/install-python-2-7-on-ubuntu-and-linuxmint/
Now, when I run the application on python2.7.14 it says that I don't have module RPi.GPIO and PIL, and when I try to install/update it says it's already installed.
How can I solve this?

Related

Tensorboard for Tensorflow.JS under Windows 10

I spent long time trying to figure out how to install and run Tensorboard on a Windows 10 machine, for projects that are using Tensorflow.JS
Has anybody ever made this work? If so, please share the steps.
I have Tensorflow.JS working fine with my GPU under Windows 10, but I cannot find any documentation for using Tensorboard under the combination of Windows + Tensorflow.JS
Environment:
Windows 10 64-bit
Node.JS v14.17.3
Python v3.8.9
Tensorflow v2.5.0
Tensorflow.JS v3.8.0
I'm using #tensorflow/tfjs-node-gpu, with RTX3080Ti, which works fine.
The documentation here shows how to integrate tfjs in node with the tensorboad. But it requires tensorboard to be aldready installed.
When using it tensorflow with python, tensorboard comes as a dependency of the tensorflow package. But using it in js requires to install the tensorboard package as a standalone package.
pip install tensorboard
So far, pip is the only way I think to install tensorboard. If the command fails, it probably must have to do with the python version, but it can be changed easily

No module named grp on windows Python 2.7.11

Python 2.7.11 is installed on a Windows 10 machine. A Python tool called Pulsar (https://pulsar.readthedocs.io/en/latest/install.html) which is designed to be cross OS was installed successfully. However when I tried to start the tool, some error message "ImportError: No module named grp" turned up. It seems that grp module is for linux group function which naturally should not be available on windows, but as said before Pulsar is supposed to be able to run on any OS. How to solve this problem? Many thanks!

Configure Web2Py to use Anaconda Python

I am new to Web2Py and Python stack. I need to use a module in my Web2Py application which uses "gensim" and "nltk" libraries. I tried installing these into my Python 2.7 on a Windows 7 environment but came across several errors due to some issues with "numpy" and "scipy" installations on Windows 7. Then I ended up resolving those errors by uninstalling Python 2.7 and instead installing Anaconda Python which successfully installed the required "gensim" and "nltk" libraries.
So, at this stage I am able to see all these "gensim" and "nltk" libraries resolving properly without any error in "Spyder" and "PyCharm". However, when I run my application in Web2Py, it still complains about "gensim" and gives this error: <type 'exceptions.ImportError'> No module named gensim
My guess is if I can configure Web2Py to use the Anaconda Python then this issue would be resolved.
I need to know if it's possible to configure Web2Py to use Anaconda Python and if it is then how do I do that?
Otherwise, if someone knows of some other way resolve that "gensim" error in Web2Py kindly share your thoughts.
All your help would be highly appreciated.
The Windows binary includes it's own Python interpreter and will therefore not see any packages you have in your local Python installation.
If you already have Python installed, you should instead run web2py from source.

Deployment of Python to support embedded and extended ways

I'm currently trying to deploy a site-package using Python 2.7 in a project written in C++ and using SWIG. Everything works very well. Our application is distributed to many clients, and we have one big existential question: should our installation package install Python itself (let's say in 'C:\Python27'), or should we include only the python27.dll along with the DLLs and Lib folder of Python, as explained here: C++ with Python embedding: crash if Python not installed
For the embedded way of using our site-package, I see no problem of not installing Python using its install program (from python.org). But for the extended usage, if we take the approach of NOT installing Python on the client machine, I am wondering what will happen if the client installs another thid-party library (like numpy). Will numpy work even though Python 2.7 has not been installed properly (no registry keys have been set, etc.) And if the client wants to use IDLE or PyDev, how can he do that if Python has not been previously installed on its machine?

webfaction hosted django app, shopify module will not import

I've recently created a site with a django app hosted by webfaction. In general, things are running as expected, but I am also trying to use the ShopifyAPI, and get "Import error, no module named shopify" traced to one of my views.py. Everything worked when developing on localhost.
I SSHed into the host server and tried to install the ShopifyAPI with easy_install. It seemed to have reported being successfully installed, but I'm not sure if this actually does anything real on an external server?
Does anybody have suggestions? Any limitations on ShopifyAPI that I may not have considered?
Thanks!
The easy_install command will install the module for Python2.4. You are likely using Python2.6 or Python2.7. If you are using Python2.6, enter:
easy_install-2.6 ShopifyAPI instead of easy_install ShopifyAPI.
If you are using Python2.7, enter:
easy_install-2.7 ShopifyAPI insead of easy_install ShopifyAPI.
You can read more about using easy_install on Webfaction here
After installing the API, restart your Apache instance and it should see the module as expected.