web2py cannot import pymysql 0.9.2 : No module named cryptography.hazmat.backends - cryptography

I installed web2py in Windows using web2py.exe. When I try to update pymysql using 0.9.2, I got this error "No module named cryptography.hazmat.backends" when I try to start web2py.exe and cannot import pymysql driver. This only happens with pymysql 0.9.2 not 0.8.1 or lower. pymysql 0.9.2 works ok on windows alone not with web2py. I know that for pymysql 0.9.2 it requires cryptography, I already installed it via pip3. May I ask what I'm missing? Thanks so much.

The Windows binary version of web2py (i.e., web2py.exe) includes its own Python interpreter and does not use the system installed Python or any of its libraries. External libraries must be installed into its /site-packages folder. However, given that you already have Python installed on your system, a simpler option is to use the source version of web2py rather than web2py.exe.

Related

Does tensorflow support Python 3.6.4 on Windows?

I'm running a Windows computer with just a CPU (no GPU). When I run pip install tensorflow -vvv in order to see what pip is doing, it lists a lot of links, but for all of them, it says "Skipping link ... it is not compatible with this Python."
Does tensorflow support Python 3.6.4 on Windows? If so, what binary URL should I use to install it?
(I previously installed with this version due to reading this, but ran into this error without the DLL load failed message, so I'm wondering if there's a better version I should use.)
Also, I'm aware that Tensorflow says they support Python 3.x, but right now it hasn't been working for me.
You have probably installed Python 32bits, you need the 64bits version

Packaging with Pyinstaller - PyQt5 setStyle ignored

I'm actually have an similar issue as described here after update python, pyistaller, pyqt5, pyqt5-tools. Before I got the desired "Windows Vista-style" without app.setStyle('windowsvista') when I run the compiled stand-alone executable.
Now I got the Windows "Classic-style" instead. If I start the application in PyCharm it will use the desired "Windows Vista-style".
Currently installed on Win7 64bit:
Python : 3.6.4
PyInstaller: 3.3.1
PyQt5 : 5.10
pyqt5-tools: 5.9.0.1.2 (update to 5.9.1.1 doesn't work)
Does anyone have any idea why PyInstaller ignored the style?
The error seems to have been fixed in a unmerged branch of PyInstaller. More information can be found on the GitHub pull request conversation, but reinstalling PyInstaller using pip install https://github.com/bjones1/pyinstaller/archive/pyqt5_fix.zip fixed the same style issue for me on Mac.

On win7 when import tensoreflow it shows "no module named_pywrap_tensorflow" after i do use the vc_redist

the redist(x86) is different from those answers provided before(x64).Is that the point?
Meanwhile it shows "Unless you are using bazel, you should try to import tensorflow from its source directory".But i didn't do that.
Ensure that you have Visual Studio Installed and that MSVCP140.DLL is on your computer AND in your PATH envVar. You shouldn't be building from source on Windows as it is not supported. I assume that you installed via pip?
Check for the DLL, VS, your PATH variables and, if that doesn't work, redownload the vc_redist_x64 version.
Failing that, uninstall Tensorflow and try again with pip install tensorflow or from a nightly. I had a similar issue and starting fresh seemed to help.

RuntimeError: the sip module implements API v11.0 to v11.2 but the module requires API v12.0

So I am facing this error:
RuntimeError: the sip module implements API v11.0 to v11.2 but the module requires API v12.0
I believe this has been answered a few times on the web for different versions of sip and PyQt4, however, I could not find any set answer for two definite things:
Everyone asks to remove all versions of sip and PyQt4 before a fresh installation. Can someone help with a set command to do that (remove all sip and PyQt4 versions iteratively)?
I want to run PyQt4 import QtGui specifically. Can someone tell me the right PyQt4 and sip version to do that?
OS Details
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial
Python Version
2.7.12
Thanks for helping,
Adarsh

installing virtualenvwrapper causes untested argparse to be installed

I have installed virtualenvwrapper in a 3.5.0b1 virtualenv, called setupenv, to be able to generate new python 3.5 test environments easily.
Looking over the list of installed packages, I did see argparse version 1.3.0 installed. This (latest) version of argparse has not been tested with 3.5.
Is this dangerous?
As far as I know 3.2+ comes with its own argparse. Could this install break other packages relying on argparse? Why is this installed at all?
This is probably not dangerous. If you run:
python3.5 -c "import argparse; print(argparse.__file__)"
, you can see that the arparse.py installed with the interpreter takes precedence over the superfluously installed argparse package.
A bit of digging (or using the pipdeptree package) will show you that stevedore is dependent on argparse. This is just sloppy programming (or disregard of possible bandwidth issues).
In a package's setup.py you can easily test if you are running python < 2.7 or 3.0 <= python < 3.2 and only install argparse for those cases.
I would just de-install argparse from your setupenv virtualenv (pip uninstall argparse -y), virtualenvwrapper is not affected by the removal in my experience.
This is actually a bug in stevedore, it uses the pbr package and that supports specification of the python version using environment markers
but stevedore is not using that. The irony is that the example for this in pbr is with argparse, by specifying in the requirements.txt:
argparse; python=='2.6'
A bug report against stevedore was filed, but although the fix was trivial, it was not implemented for several releases. Finally the issue was
set to won't fix, probably because dropped support for 2.6 removed the
need for argparse altogether.