Skip to content

Instantly share code, notes, and snippets.

@freakboy3742
Last active March 13, 2017 07:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save freakboy3742/c8d26377ac20bb3158e98367a55b7c2b to your computer and use it in GitHub Desktop.
Save freakboy3742/c8d26377ac20bb3158e98367a55b7c2b to your computer and use it in GitHub Desktop.
What the hell is `mobility`?

Create virtual environment

hammer:briefcase rkm$ mkvirtualenv --python=`which python3.5` briefcase3.5
Running virtualenv with interpreter /usr/local/bin/python3.5
Using base prefix '/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5'
New python executable in /Users/rkm/.virtualenvs/briefcase3.5/bin/python3.5
Also creating executable in /Users/rkm/.virtualenvs/briefcase3.5/bin/python
Installing setuptools, pip, wheel...done.
Collecting ipython
  Using cached ipython-5.3.0-py3-none-any.whl
Collecting pexpect; sys_platform != "win32" (from ipython)
  Using cached pexpect-4.2.1-py2.py3-none-any.whl
Collecting appnope; sys_platform == "darwin" (from ipython)
  Using cached appnope-0.1.0-py2.py3-none-any.whl
Collecting decorator (from ipython)
  Using cached decorator-4.0.11-py2.py3-none-any.whl
Requirement already satisfied: setuptools>=18.5 in /Users/rkm/.virtualenvs/briefcase3.5/lib/python3.5/site-packages (from ipython)
Collecting pygments (from ipython)
  Using cached Pygments-2.2.0-py2.py3-none-any.whl
Collecting traitlets>=4.2 (from ipython)
  Using cached traitlets-4.3.2-py2.py3-none-any.whl
Collecting prompt-toolkit<2.0.0,>=1.0.4 (from ipython)
  Using cached prompt_toolkit-1.0.13-py3-none-any.whl
Collecting pickleshare (from ipython)
  Using cached pickleshare-0.7.4-py2.py3-none-any.whl
Collecting simplegeneric>0.8 (from ipython)
Collecting ptyprocess>=0.5 (from pexpect; sys_platform != "win32"->ipython)
  Using cached ptyprocess-0.5.1-py2.py3-none-any.whl
Requirement already satisfied: six>=1.6.0 in /Users/rkm/.virtualenvs/briefcase3.5/lib/python3.5/site-packages (from setuptools>=18.5->ipython)
Requirement already satisfied: appdirs>=1.4.0 in /Users/rkm/.virtualenvs/briefcase3.5/lib/python3.5/site-packages (from setuptools>=18.5->ipython)
Requirement already satisfied: packaging>=16.8 in /Users/rkm/.virtualenvs/briefcase3.5/lib/python3.5/site-packages (from setuptools>=18.5->ipython)
Collecting ipython-genutils (from traitlets>=4.2->ipython)
  Using cached ipython_genutils-0.1.0-py2.py3-none-any.whl
Collecting wcwidth (from prompt-toolkit<2.0.0,>=1.0.4->ipython)
  Using cached wcwidth-0.1.7-py2.py3-none-any.whl
Requirement already satisfied: pyparsing in /Users/rkm/.virtualenvs/briefcase3.5/lib/python3.5/site-packages (from packaging>=16.8->setuptools>=18.5->ipython)
Installing collected packages: ptyprocess, pexpect, appnope, decorator, pygments, ipython-genutils, traitlets, wcwidth, prompt-toolkit, pickleshare, simplegeneric, ipython
Successfully installed appnope-0.1.0 decorator-4.0.11 ipython-5.3.0 ipython-genutils-0.1.0 pexpect-4.2.1 pickleshare-0.7.4 prompt-toolkit-1.0.13 ptyprocess-0.5.1 pygments-2.2.0 simplegeneric-0.8.1 traitlets-4.3.2 wcwidth-0.1.7
Requirement already up-to-date: pip in /Users/rkm/.virtualenvs/briefcase3.5/lib/python3.5/site-packages
Requirement already up-to-date: setuptools in /Users/rkm/.virtualenvs/briefcase3.5/lib/python3.5/site-packages
Requirement already up-to-date: packaging>=16.8 in /Users/rkm/.virtualenvs/briefcase3.5/lib/python3.5/site-packages (from setuptools)
Requirement already up-to-date: appdirs>=1.4.0 in /Users/rkm/.virtualenvs/briefcase3.5/lib/python3.5/site-packages (from setuptools)
Requirement already up-to-date: six>=1.6.0 in /Users/rkm/.virtualenvs/briefcase3.5/lib/python3.5/site-packages (from setuptools)
Requirement already up-to-date: pyparsing in /Users/rkm/.virtualenvs/briefcase3.5/lib/python3.5/site-packages (from packaging>=16.8->setuptools)


(briefcase3.5) hammer:briefcase rkm$ pip freeze
appdirs==1.4.3
appnope==0.1.0
decorator==4.0.11
ipython==5.3.0
ipython-genutils==0.1.0
packaging==16.8
pexpect==4.2.1
pickleshare==0.7.4
prompt-toolkit==1.0.13
ptyprocess==0.5.1
Pygments==2.2.0
pyparsing==2.2.0
simplegeneric==0.8.1
six==1.10.0
traitlets==4.3.2
wcwidth==0.1.7

Manually add some known dependencies

Cookiecutter

(briefcase3.5) hammer:briefcase rkm$ pip install "cookiecutter>=1.0"
Collecting cookiecutter>=1.0
  Using cached cookiecutter-1.5.1-py2.py3-none-any.whl
Collecting jinja2>=2.7 (from cookiecutter>=1.0)
  Using cached Jinja2-2.9.5-py2.py3-none-any.whl
Collecting whichcraft>=0.4.0 (from cookiecutter>=1.0)
  Using cached whichcraft-0.4.0-py2.py3-none-any.whl
Collecting binaryornot>=0.2.0 (from cookiecutter>=1.0)
  Using cached binaryornot-0.4.0-py2.py3-none-any.whl
Collecting click>=5.0 (from cookiecutter>=1.0)
  Using cached click-6.7-py2.py3-none-any.whl
Collecting jinja2-time>=0.1.0 (from cookiecutter>=1.0)
  Using cached jinja2_time-0.2.0-py2.py3-none-any.whl
Collecting future>=0.15.2 (from cookiecutter>=1.0)
Collecting poyo>=0.1.0 (from cookiecutter>=1.0)
  Using cached poyo-0.4.0-py2.py3-none-any.whl
Collecting MarkupSafe>=0.23 (from jinja2>=2.7->cookiecutter>=1.0)
Collecting chardet>=2.0.0 (from binaryornot>=0.2.0->cookiecutter>=1.0)
  Using cached chardet-2.3.0-py2.py3-none-any.whl
Collecting arrow (from jinja2-time>=0.1.0->cookiecutter>=1.0)
Collecting python-dateutil (from arrow->jinja2-time>=0.1.0->cookiecutter>=1.0)
  Using cached python_dateutil-2.6.0-py2.py3-none-any.whl
Requirement already satisfied: six>=1.5 in /Users/rkm/.virtualenvs/briefcase3.5/lib/python3.5/site-packages (from python-dateutil->arrow->jinja2-time>=0.1.0->cookiecutter>=1.0)
Installing collected packages: MarkupSafe, jinja2, whichcraft, chardet, binaryornot, click, python-dateutil, arrow, jinja2-time, future, poyo, cookiecutter
Successfully installed MarkupSafe-1.0 arrow-0.10.0 binaryornot-0.4.0 chardet-2.3.0 click-6.7 cookiecutter-1.5.1 future-0.16.0 jinja2-2.9.5 jinja2-time-0.2.0 poyo-0.4.0 python-dateutil-2.6.0 whichcraft-0.4.0

(briefcase3.5) hammer:briefcase rkm$ pip freeze
appdirs==1.4.3
appnope==0.1.0
arrow==0.10.0
binaryornot==0.4.0
chardet==2.3.0
click==6.7
cookiecutter==1.5.1
decorator==4.0.11
future==0.16.0
ipython==5.3.0
ipython-genutils==0.1.0
Jinja2==2.9.5
jinja2-time==0.2.0
MarkupSafe==1.0
packaging==16.8
pexpect==4.2.1
pickleshare==0.7.4
poyo==0.4.0
prompt-toolkit==1.0.13
ptyprocess==0.5.1
Pygments==2.2.0
pyparsing==2.2.0
python-dateutil==2.6.0
simplegeneric==0.8.1
six==1.10.0
traitlets==4.3.2
wcwidth==0.1.7
whichcraft==0.4.0

VOC

(briefcase3.5) hammer:briefcase rkm$ pip install "voc>=0.1.1"
Collecting voc>=0.1.1
  Using cached voc-0.1.2-py3-none-any.whl
Installing collected packages: voc
Successfully installed voc-0.1.2


(briefcase3.5) hammer:briefcase rkm$ pip freeze
appdirs==1.4.3
appnope==0.1.0
arrow==0.10.0
binaryornot==0.4.0
chardet==2.3.0
click==6.7
cookiecutter==1.5.1
decorator==4.0.11
future==0.16.0
ipython==5.3.0
ipython-genutils==0.1.0
Jinja2==2.9.5
jinja2-time==0.2.0
MarkupSafe==1.0
packaging==16.8
pexpect==4.2.1
pickleshare==0.7.4
poyo==0.4.0
prompt-toolkit==1.0.13
ptyprocess==0.5.1
Pygments==2.2.0
pyparsing==2.2.0
python-dateutil==2.6.0
simplegeneric==0.8.1
six==1.10.0
traitlets==4.3.2
voc==0.1.2
wcwidth==0.1.7
whichcraft==0.4.0

Now pip install briefcase

(briefcase3.5) hammer:briefcase rkm$ pip install -e .
Obtaining file:///Users/rkm/projects/beeware/briefcase
Requirement already satisfied: pip>=8.1 in /Users/rkm/.virtualenvs/briefcase3.5/lib/python3.5/site-packages (from briefcase==0.1.5)
Requirement already satisfied: cookiecutter>=1.0 in /Users/rkm/.virtualenvs/briefcase3.5/lib/python3.5/site-packages (from briefcase==0.1.5)
Requirement already satisfied: voc>=0.1.1 in /Users/rkm/.virtualenvs/briefcase3.5/lib/python3.5/site-packages (from briefcase==0.1.5)
Requirement already satisfied: setuptools>=27.0 in /Users/rkm/.virtualenvs/briefcase3.5/lib/python3.5/site-packages (from briefcase==0.1.5)
Requirement already satisfied: poyo>=0.1.0 in /Users/rkm/.virtualenvs/briefcase3.5/lib/python3.5/site-packages (from cookiecutter>=1.0->briefcase==0.1.5)
Requirement already satisfied: jinja2-time>=0.1.0 in /Users/rkm/.virtualenvs/briefcase3.5/lib/python3.5/site-packages (from cookiecutter>=1.0->briefcase==0.1.5)
Requirement already satisfied: whichcraft>=0.4.0 in /Users/rkm/.virtualenvs/briefcase3.5/lib/python3.5/site-packages (from cookiecutter>=1.0->briefcase==0.1.5)
Requirement already satisfied: click>=5.0 in /Users/rkm/.virtualenvs/briefcase3.5/lib/python3.5/site-packages (from cookiecutter>=1.0->briefcase==0.1.5)
Requirement already satisfied: future>=0.15.2 in /Users/rkm/.virtualenvs/briefcase3.5/lib/python3.5/site-packages (from cookiecutter>=1.0->briefcase==0.1.5)
Requirement already satisfied: jinja2>=2.7 in /Users/rkm/.virtualenvs/briefcase3.5/lib/python3.5/site-packages (from cookiecutter>=1.0->briefcase==0.1.5)
Requirement already satisfied: binaryornot>=0.2.0 in /Users/rkm/.virtualenvs/briefcase3.5/lib/python3.5/site-packages (from cookiecutter>=1.0->briefcase==0.1.5)
Requirement already satisfied: six>=1.6.0 in /Users/rkm/.virtualenvs/briefcase3.5/lib/python3.5/site-packages (from setuptools>=27.0->briefcase==0.1.5)
Requirement already satisfied: appdirs>=1.4.0 in /Users/rkm/.virtualenvs/briefcase3.5/lib/python3.5/site-packages (from setuptools>=27.0->briefcase==0.1.5)
Requirement already satisfied: packaging>=16.8 in /Users/rkm/.virtualenvs/briefcase3.5/lib/python3.5/site-packages (from setuptools>=27.0->briefcase==0.1.5)
Requirement already satisfied: arrow in /Users/rkm/.virtualenvs/briefcase3.5/lib/python3.5/site-packages (from jinja2-time>=0.1.0->cookiecutter>=1.0->briefcase==0.1.5)
Requirement already satisfied: MarkupSafe>=0.23 in /Users/rkm/.virtualenvs/briefcase3.5/lib/python3.5/site-packages (from jinja2>=2.7->cookiecutter>=1.0->briefcase==0.1.5)
Requirement already satisfied: chardet>=2.0.0 in /Users/rkm/.virtualenvs/briefcase3.5/lib/python3.5/site-packages (from binaryornot>=0.2.0->cookiecutter>=1.0->briefcase==0.1.5)
Requirement already satisfied: pyparsing in /Users/rkm/.virtualenvs/briefcase3.5/lib/python3.5/site-packages (from packaging>=16.8->setuptools>=27.0->briefcase==0.1.5)
Requirement already satisfied: python-dateutil in /Users/rkm/.virtualenvs/briefcase3.5/lib/python3.5/site-packages (from arrow->jinja2-time>=0.1.0->cookiecutter>=1.0->briefcase==0.1.5)
Installing collected packages: briefcase
  Running setup.py develop for briefcase
Successfully installed briefcase


(briefcase3.5) hammer:briefcase rkm$ pip freeze
appdirs==1.4.3
appnope==0.1.0
arrow==0.10.0
binaryornot==0.4.0
-e git+git@github.com:pybee/briefcase.git@58a67fd90e4d1be8b7bab724adc429cde18c1071#egg=briefcase
chardet==2.3.0
click==6.7
cookiecutter==1.5.1
decorator==4.0.11
future==0.16.0
ipython==5.3.0
ipython-genutils==0.1.0
Jinja2==2.9.5
jinja2-time==0.2.0
MarkupSafe==1.0
mobility==0.1.0
packaging==16.8
pexpect==4.2.1
pickleshare==0.7.4
poyo==0.4.0
prompt-toolkit==1.0.13
ptyprocess==0.5.1
Pygments==2.2.0
pyparsing==2.2.0
python-dateutil==2.6.0
simplegeneric==0.8.1
six==1.10.0
traitlets==4.3.2
voc==0.1.2
wcwidth==0.1.7
whichcraft==0.4.0

As expected, briefcase been added. But so has mobility==0.1.0 - which:

  • isn't mentioned in the install log

  • doesn't occur once in the briefcase sourcetree

  • Isn't registered on PyPI

  • Can't be uninstalled:

    (briefcase3.5) hammer:briefcase rkm$ pip uninstall mobility Not uninstalling mobility at /Users/rkm/projects/beeware/briefcase, outside environment /Users/rkm/.virtualenvs/briefcase3.5/bin/..

@ncoghlan
Copy link

Some additional diagnostics to try:

  • python -m site (prints resolved import system configuration details)
  • python -c 'import pkg_resources; print(pkg_resources.get_distribution("mobility"))'

@AnthonyBriggs
Copy link

AnthonyBriggs commented Mar 13, 2017

FWIW, I just tried your steps, but didn't get a mobility package installed.

My pip freeze (the initial error will be because I don't have git installed):

C:\Users\Anthony\briefcase35\briefcase-master> pip freeze
Error [WinError 2] The system cannot find the file specified while executing command git rev-parse
appdirs==1.4.3
appnope==0.1.0
arrow==0.10.0
binaryornot==0.4.0
briefcase==0.1.5
chardet==2.3.0
click==6.7
colorama==0.3.7
cookiecutter==1.5.1
decorator==4.0.11
future==0.16.0
ipython==5.3.0
ipython-genutils==0.1.0
Jinja2==2.9.5
jinja2-time==0.2.0
MarkupSafe==1.0
packaging==16.8
pbr==1.10.0
pexpect==4.2.1
pickleshare==0.7.4
poyo==0.4.0
prompt-toolkit==1.0.13
ptyprocess==0.5.1
py==1.4.31
pygame==1.9.2b1
Pygments==2.2.0
pyparsing==2.2.0
pytest==2.9.2
python-dateutil==2.6.0
requests==2.11.0
simplegeneric==0.8.1
six==1.10.0
stevedore==1.17.0
traitlets==4.3.2
virtualenv==15.0.3
virtualenv-clone==0.2.6
virtualenvwrapper==4.7.1
voc==0.1.2
wcwidth==0.1.7
whichcraft==0.4.0
win-unicode-console==0.5

@Aramgutang
Copy link

If it helps at all, on an Arch Linux machine, with Python 3.6, I end up with the environment below. Note that I had to manually request installation of ipython, since mkvirtualenv didn't do it for me automatically, as it appears to do for you. Given the "outside environment" error you're getting, I would assume it's an OSX-specific issue, maybe to do with the whole weird "Frameworks" thing.

appdirs==1.4.3
arrow==0.10.0
binaryornot==0.4.0
-e git+https://github.com/pybee/briefcase.git@58a67fd90e4d1be8b7bab724adc429cde18c1071#egg=briefcase
chardet==2.3.0
click==6.7
cookiecutter==1.5.1
decorator==4.0.11
future==0.16.0
ipython==5.3.0
ipython-genutils==0.1.0
Jinja2==2.9.5
jinja2-time==0.2.0
MarkupSafe==1.0
packaging==16.8
pexpect==4.2.1
pickleshare==0.7.4
poyo==0.4.0
prompt-toolkit==1.0.13
ptyprocess==0.5.1
Pygments==2.2.0
pyparsing==2.2.0
python-dateutil==2.6.0
simplegeneric==0.8.1
six==1.10.0
traitlets==4.3.2
voc==0.1.2
wcwidth==0.1.7
whichcraft==0.4.0

@rbtcollins
Copy link

Yes, Apple have done some weird path stuff; I am suspecting some quick investigation of actual paths will uncover it very quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment