question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I tried to use pipenv in my project with tox, but got an error: System: Ubuntu 14.04

tox.ini

[tox]
envlist=py27,py34

[testenv]
passenv = DISPLAY CI TRAVIS TRAVIS_*
deps =
    pipenv
    codecov
commands=
   pipenv lock
   pipenv install --dev
   pipenv run py.test

Error:

GLOB sdist-make: /home/sergey/PycharmProjects/webdriver_manager/setup.py
py27 inst-nodeps: /home/sergey/PycharmProjects/webdriver_manager/.tox/dist/webdriver_manager-1.4.4.zip
py27 installed: The directory '/home/sergey/.cache/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.,appdirs==1.4.2,backports.shutil-get-terminal-size==1.0.0,blindspin==2.0.1,click==6.7,click-completion==0.2.1,colorama==0.3.7,configparser==3.5.0,crayons==0.1.2,delegator.py==0.0.8,Jinja2==2.9.5,MarkupSafe==0.23,packaging==16.8,parse==1.8.0,pathlib==1.0.1,pew==0.1.26,pexpect==4.2.1,pipenv==3.5.0,pipfile==0.0.1,psutil==5.1.3,ptyprocess==0.5.1,pyparsing==2.1.10,pythonz-bd==1.11.4,requests==2.13.0,requirements-parser==0.1.0,shutilwhich==1.1.0,six==1.10.0,toml==0.9.2,virtualenv==15.1.0,virtualenv-clone==0.2.6,webdriver-manager==1.4.4
py27 runtests: PYTHONHASHSEED='1109454899'
py27 runtests: commands[0] | pipenv lock
Creating a virtualenv for this project...
⠋Traceback (most recent call last):
  File "/home/sergey/PycharmProjects/webdriver_manager/.tox/py27/bin/pew", line 7, in <module>
    from pew.pew import pew
  File "/home/sergey/PycharmProjects/webdriver_manager/.tox/py27/local/lib/python2.7/site-packages/pew/__init__.py", line 11, in <module>
    from . import pew
  File "/home/sergey/PycharmProjects/webdriver_manager/.tox/py27/local/lib/python2.7/site-packages/pew/pew.py", line 24, in <module>
    from pythonz.commands.install import InstallCommand
  File "/home/sergey/PycharmProjects/webdriver_manager/.tox/py27/local/lib/python2.7/site-packages/pythonz/__init__.py", line 8, in <module>
    from pythonz.define import PATH_HOME_ETC, PATH_PYTHONS
  File "/home/sergey/PycharmProjects/webdriver_manager/.tox/py27/local/lib/python2.7/site-packages/pythonz/define.py", line 10, in <module>
    ROOT = os.environ.get('PYTHONZ_ROOT') or os.path.join(os.environ['HOME'], '.pythonz') if not os.path.abspath(os.path.dirname(__file__)).startswith(SYSTEMWIDE_PATH) else SYSTEMWIDE_PATH
  File "/home/sergey/PycharmProjects/webdriver_manager/.tox/py27/lib/python2.7/UserDict.py", line 23, in __getitem__
    raise KeyError(key)
KeyError: 'HOME'

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
SergeyPirogovcommented, Mar 5, 2017

Yes, this works for me too

2reactions
edubxbcommented, Mar 5, 2017

I had the same problem, I fixed it adding:

passenv =
    HOME

to the [testenv] section of tox configuration.

I’m using pipenv + pyenv + tox.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error message with tox and tox-pipenv when installing local ...
I am having problem using tox and tox-pipenv. tox.ini is very simple [tox] envlist = py37 and I am able to create (and...
Read more >
How to properly use Pipenv and Tox? - python - Stack Overflow
The problem is that when I use tox to validate my code against Python 2.7, pipenv checks the pipfile.lock which contains the hashes...
Read more >
tox-pipenv - PyPI
A pipenv plugin for tox. ... Bugfix : Fixed issue on newer versions of pipenv raising error “AttributeError: 'Project' object has no attribute...
Read more >
Python tox doesn't build anymore - Feedback & Bug Reports
I have a python test suite running with tox and since this morning test suite do not run any longer and return the...
Read more >
Advanced Usage of Pipenv - Read the Docs
Dependencies of wheels provided in a Pipfile will not be captured by $ pipenv lock . There are some known issues with using...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found