add python2 vs 3 issue

pull/282/head
Dan Guido 7 years ago committed by GitHub
parent 27e0fd073b
commit 1a3341c449

@ -4,12 +4,13 @@
2. [Error: "fatal error: 'openssl/opensslv.h' file not found"](#2-error-fatal-error-opensslopensslvh-file-not-found)
3. [Little Snitch is broken when connected to the VPN](#3-little-snitch-is-broken-when-connected-to-the-vpn)
4. [Various websites appear to be offline through the VPN](#4-various-websites-appear-to-be-offline-through-the-vpn)
5.
6. [I have a problem not covered here](i-have-a-problem-not-covered-here)
5. [Bad owner or permissions on .ssh](#5-bad-owner-or-permissions-on-ssh)
6. [Error: "TypeError: must be str, not bytes"](#6-error-typerror-must-be-str-not-bytes)
7. [I have a problem not covered here](i-have-a-problem-not-covered-here)
### 1. Error: "You have not agreed to the Xcode license agreements"
On macOS, did you try to install the dependencies with pip and encounter the following error?
On macOS, you tried to install the dependencies with pip and encountered the following error:
```
Downloading cffi-1.9.1.tar.gz (407kB): 407kB downloaded
@ -33,7 +34,7 @@ The Xcode compiler is installed but requires you to accept its license agreement
### 2. Error: "fatal error: 'openssl/opensslv.h' file not found"
On macOS, did you try to install pycrypto and encounter the following error?
On macOS, you tried to install pycrypto and encountered the following error:
```
build/temp.macosx-10.12-intel-2.7/_openssl.c:434:10: fatal error: 'openssl/opensslv.h' file not found
@ -72,7 +73,18 @@ fatal: [104.236.2.94]: UNREACHABLE! => {"changed": false, "msg": "Failed to conn
You need to reset the permissions on your `.ssh` directory. Run `chmod 700 /home/user/.ssh` and then `chmod 600 /home/user/.ssh/config`. You may need to repeat this for other files mentioned in the error message.
### 6. Error: "TypeError: must be str, not bytes"
You tried to install Algo and you see many repeated errors referencing `TypeError`, such as `TypeError: '>=' not supported between instances of 'TypeError' and 'int'` and `TypeError: must be str, not bytes`. For example:
```
TASK [Wait until SSH becomes ready...] *****************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: must be str, not bytes
fatal: [localhost -> localhost]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Traceback (most recent call last):\n File \"/var/folders/x_/nvr61v455qq98vp22k5r5vm40000gn/T/ansible_6sdjysth/ansible_module_wait_for.py\", line 538, in <module>\n main()\n File \"/var/folders/x_/nvr61v455qq98vp22k5r5vm40000gn/T/ansible_6sdjysth/ansible_module_wait_for.py\", line 483, in main\n data += response\nTypeError: must be str, not bytes\n", "module_stdout": "", "msg": "MODULE FAILURE"}
```
You may be trying to run Algo with Python3. Algo uses [Ansible](https://github.com/ansible/ansible) which has issues with Python3, although this situation is improving over time. Try running Algo with Python2 to fix this issue. Open your terminal and `cd` to the directory with Algo, then run: ``virtualenv -p `which python2.7` env && source env/bin/activate && pip install -r requirements.txt``
### I have a problem not covered here
If you have an issue that you cannot solve with the guidance here, [join our Slack](https://empireslacking.herokuapp.com/) and ask for help in the #tool-algo channel or [file an issue](https://github.com/trailofbits/algo/issues/new) that describes the problem and we'll do our best to help you.

Loading…
Cancel
Save