Skip to content

.pth errors on first install #81

@skytreader

Description

@skytreader

I am trying to solve #80 which should be simple enough. I modified the script so that it calls mkdir manually on each subdirectory under $VENVBURRITO, instead of using the curly braces notation.

However, installation fails as follows:

TEST FAILED: /home/cestioco/.venvburrito/lib/python2.7/site-packages does NOT support .pth files
error: bad install directory or PYTHONPATH

You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from.  The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /home/cestioco/.venvburrito/lib/python2.7/site-packages

and your PYTHONPATH environment variable currently contains:

    '/home/cestioco/.venvburrito/lib/python2.7'

Here are some of your options for correcting the problem:

* You can choose a different installation directory, i.e., one that is
  on PYTHONPATH or supports .pth files

* You can add the installation directory to the PYTHONPATH environment
  variable.  (It must then also be on PYTHONPATH whenever you run
  Python and want to use the package(s) you are installing.)

* You can set up the installation directory to support ".pth" files by
  using one of the approaches described here:

  https://setuptools.readthedocs.io/en/latest/easy_install.html#custom-installation-locations


Please make the appropriate changes for your system and try again.
  Downloading pip-19.0.2.tar.gz …
* Upgrading pip …
  Installing pip-19.0.2
Traceback (most recent call last):
  File "setup.py", line 6, in <module>
    from setuptools import find_packages, setup
ImportError: No module named setuptools
  Downloading virtualenv-16.4.0.tar.gz …
* Upgrading virtualenv …
  Installing virtualenv-16.4.0
/bin/sh: 1: /home/cestioco/.venvburrito/libexec/pip: not found
  Downloading virtualenvwrapper-4.8.4.tar.gz …
* Upgrading virtualenvwrapper …
  Installing virtualenvwrapper-4.8.4
/bin/sh: 1: /home/cestioco/.venvburrito/libexec/pip: not found

Fin.

Your shell profile could not be detected.
Please contact @brainsik on Twitter or GitHub.

Done with setup!

To start now, run this:
source /home/cestioco/.venvburrito/startup.sh

A few things:

  • Maybe don't print "Done with setup! To start now..." if an error was encountered during set-up.
  • I'm looking for a workaround to this but it feels like a bug with virtualenv-burrito (or, at least, a weird behavior of Ubuntu 18.04 that virtualenv-burrito should handle, and maybe In Ubuntu 18.04 the subdirectories are not created individually #80 is one too). I think it's reasonable to assume that my modification isn't causing this; I basically just unrolled the mkdir command.

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions