pip freeze without dependencies of installed packages

When I do pip freeze I get the packages I've explicitly installed plus those packages that are dependencies of those packages. For example: $ pip install fabric ... $ pip...

From virtualenv, pip freeze > requirements.txt give TONES of garbage! How to trim it out?

I'm following this tutorial: http://devcenter.heroku.com/articles/django At some point I'm suposed to do: pip freeze > requirements.txt (Ofc. from virtualenv created instance of python) And I...

Encrypt & Decrypt using PyCrypto AES 256

I'm trying to build two functions using PyCrypto that accept two parameters: the message and the key, and then encrypt/decrypt the message. I found several links on the web to help me out, but...

PyCrypto install error on Windows

I am trying to install PyCrypto 2.6 Library on my computer. But I keep getting the following error D:\Software\Python\package\pycrypto-2.6>python setup.py build running build running...

Implement OpenSSL AES Encryption in Python

I'm trying to implement the following in Python: openssl enc -e -aes-256-cbc -base64 -k "Secret Passphrase" -in plaintext.txt -out ciphertext.txt openssl enc -d -aes-256-cbc -base64 -k "Secret...

Getting "Permission Denied" when running pip as root on my Mac

I've started to use my Mac to install Python packages in the same way I do with my Windows PC at work; however on my Mac I've come across frequent permission denied errors while writing to log...

Python Django requirements.txt

I have a requirements.txt file containing all my dependencies but it is not processed correctly : After a pip install -r requirements.txt, I get the following pip freeze...

Using pycrypto PKCS#7 to create a signature

I'm looking at the Apple docs for PassBook, and I need to: create a "PKCS #7 detached signature of the manifest file". I'd ideally like to do this with Python and I'd ideally like to use...

ImportError: No module named Crypto.Cipher

When I try to run app.py (Python 3.3, PyCrypto 2.6) my virtualenv keeps returning the error listed above. My import statement is just from Crypto.Cipher import AES. I looked for duplicates and you...

Read an encrypted private key with bouncycastle/spongycastle

I have a password protected, encrypted RSA private key, which was created with PyCrypto (2.6.1) and has according to their docs the following format: PrivateKeyInfo, PKCS#8 (DER SEQUENCE), PEM...

pycrypto - Ciphertext with incorrect length

I've generated a public and private key with pycrypto, and I save them to a file using export key: from Crypto.PublicKey import RSA bits=2048 new_key = RSA.generate(bits, e=65537) prv =...

Use RSA to encrypt in JavaScript and decrypt in Python3

I'm developing a website using this JS plugin to encrypt some data and send it to the server: https://github.com/travist/jsencrypt I'm running Python 3 with Django, the problem is I can't decrypt...

Importing test library 'SSHLibrary' fails with the ImportError "Importing Paramiko library failed. Make sure you have Paramiko installed."

I am trying to run robot framework test cases which uses SSHLibrary. I have installed all the required libraries (paramiko in this case). But I still get this error. The error I get is: Error in...

Install flask-bcrypt via pip: Unable to find vcvarsall.bat

I try to install flask-bcrypt via pip, but it raisis me this error: error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat) I am currently running Visual Studio 2015 RC with...

Non-detached PKCS#7 SHA1+RSA signature without M2Crypto

I'm trying to create a non-detached signature on python3. I currently have code that does this on python2 with m2crypto, but m2crypto isn't available for python3. I've been trying rsa, pycrypto...

python import of local module failing when run as systemd/systemctl service

I have a python application that I'm tring to run as a system service. The application runs fine when I run it manually. When I run it as a service it fails to find a local module that was...

Access Host redis database from docker conatiner

I am trying to connect to host redis database through my docker conatiner. In my dockerfile , I have redis as a requirement, which gets installed [pip install redis] and image is build using that...

Encrypt in PHP and decrypt in Python or openssl command line

A lot of data in a database I took over contains encrypted fields. The method used to encrypt the data is the following PHP code: <?php $text = "test 1234\ntest 2345\ntest 3456\ntest 4567"; $key =...

How do you extract N and E from a RSA public key in python?

I have a RSA public key such that it looks like -----BEGIN PUBLIC...

Flask python app crashes on heroku

I tried pushing my code directly to Heroku for hosting but I got so many errors. Now, what I did was host the code on Github, and then link the git repo with Heroku. Now, the Heroku app was...

one hot encoding for frequent values only

I am looking to do one hot encoding to a column, but only for those that are very frequent. All that are below a threshold T will be put in their own category. My strategy was to create a...

Pip error: Microsoft Visual C++ 14.0 is required

I just ran the following command: pip install -U steem and the installation worked well until it failed to install pycrypto. Afterwards I did the pip install cryptography command because I...

Failed installing pycrypto with pip

I encountered a problem when I try to download a certain package: C:\Python27\Scripts>pip install pycrypto Collecting pycrypto Using cached...

Failed building wheel for xmlsec - mac

I'm installing my mac on python virtualenv environment. Whenever I install requirement packages command "pip install -r requirements.txt" i got this messages. pip install -r requirements.txt...

How to get messages from googles Pub/Sub sytsem by using the current pubsub subsciber

I need to receive published messages from googles Pub/Sub system by using a python based subscriber. For this I did the following steps: On the web console I created a project, a registry, a...

How to validate a private key using a public key in python

I was wondering how I use a public key to validate a private key. I have absolute no idea what I am doing I am given a public key in the form...

AttributeError: module 'time' has no attribute 'clock' in Python 3.8

I have written code to generate public and private keys. It works great at Python 3.7 but it fails in Python 3.8. I don't know how it fails in the latest version. Help me with some...

Ansible failed to complete because of deprecated Python even though Python 3 is installed

I'm trying to run LaunchKit from google to get some app screenshots. I've gone through all of the steps on the GitHub page (https://github.com/LaunchKit/LaunchKit) for the open source code. After...

How do I change the terminal inside Visual Studio code to use the non-Rosetta one i.e. have it use the arm64 one?

I am new to python and am trying to run a python 2.7 script. Got pip for python 2.7 and installed a dependency of pyCrypto from the mac terminal shell. The downloaded python script, I want to try,...