plex_patrol
plex_patrol copied to clipboard
Dep errors after installing deps in both python 2 and 3
I've tried to get this working on OSX with both python 2.7.10 and 3.7.7.
I'm getting errors even after installing deps for both python 2 and 3, as instructed here.
Python 2:
Traceback (most recent call last):
File "patrol.py", line 7, in <module>
from utils.plex import Plex
File "/Users/john/Downloads/plex_patrol-master/utils/plex.py", line 3, in <module>
from urllib.parse import urljoin
ImportError: No module named parse
Python 3:
Traceback (most recent call last):
File "patrol.py", line 5, in <module>
from utils import config
File "/Users/john/Downloads/plex_patrol-master/utils/config.py", line 3, in <module>
from decouple import AutoConfig, Csv
ImportError: cannot import name 'AutoConfig' from 'decouple' (/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/decouple/__init__.py)
Any idea what I'm doing wrong here?
Thanks!
@jrefano You might have figured this out already, but I figured I would leave this here for the future.
The first error is due to the plex.py script being written for python3. Urllib.parse doesn't exist in python 2 as a module.
The second error could be due to not having python-decouple installed correctly. You can try to use a virtual environment that uses python 3.6 since that is the recommended version for python-decouple. Since you are on mac then you can use homebrew to install pyenv, which makes managing environments a lot easier. You can also use anaconda to install environments to use certain python versions.