Another typical error happened during i tried to install a new Python module:
Deryas-MacBook-Pro:etugra dsezen$ sudo pip install zeep The directory '/Users/dsezen/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. You are using pip version 7.1.0, however version 8.1.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command. The directory '/Users/dsezen/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Collecting zeep Downloading zeep-0.14.0-py2.py3-none-any.whl (65kB) 100% |████████████████████████████████| 65kB 245kB/s Requirement already satisfied (use --upgrade to upgrade): lxml>=3.0.0 in /Library/Python/2.7/site-packages (from zeep) Requirement already satisfied (use --upgrade to upgrade): pytz in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from zeep) Requirement already satisfied (use --upgrade to upgrade): appdirs>=1.4.0 in /Library/Python/2.7/site-packages (from zeep) Requirement already satisfied (use --upgrade to upgrade): cached-property>=1.0.0 in /Library/Python/2.7/site-packages (from zeep) Requirement already satisfied (use --upgrade to upgrade): defusedxml>=0.4.1 in /Library/Python/2.7/site-packages (from zeep) Collecting six>=1.9.0 (from zeep) Downloading six-1.10.0-py2.py3-none-any.whl Collecting isodate>=0.5.4 (from zeep) Collecting requests>=2.7.0 (from zeep) Downloading requests-2.11.1-py2.py3-none-any.whl (514kB) 100% |████████████████████████████████| 516kB 283kB/s Installing collected packages: six, isodate, requests, zeep Found existing installation: six 1.4.1 DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project. Uninstalling six-1.4.1: Exception: . . . OSError: [Errno 1] Operation not permitted: '/tmp/pip-zeJjMk-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'
Just i didn't want to digout whatever the hell reason regarding with access rights, Python 2.7 vs 3.x awesomeness and directly injected a Dockerfile a solved the problem right away!
FROM python:3-onbuild MAINTAINER funkydorian RUN mkdir /etugra VOLUME /etugra WORKDIR /etugra CMD python -m pip install zeep ENV PYTHONPATH .:/usr/local/lib/python3.5 CMD ["python","./etugra.py","secinitd.log"]
Build the image with:
docker build -t etugra .
Run the code whenever i make a change simply by:
docker run -it --rm --name etugra -v $PWD:/etugra etugra