Pipenv: issues with relative packages

Created on 14 Sep 2017  Â·  46Comments  Â·  Source: pypa/pipenv

@kennethreitz I'm having trouble installing local packages in relative directories via -e.

screen shot 2017-09-13 at 7 54 55 pm

This is the initial requirements.txt file:

-e ../../lib/python
arrow==0.10.0
blessings==1.6
boto3==1.4.7

This is what the converted Pipfile looks like:

[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true

[packages]
"-e file:///users/johria/development/heliograf/lib/python" = "*"
arrow = "==0.10.0"
blessings = "==1.6"

heliograf in this case is the name in setup.py of the relative package.

I believe the issue may be that the Pipfile.lock doesn't have the directory?

        "heliograf": {
            "hashes": [],
            "version": "==0.1.0"
        },

While the above is starting from the requirements.txt, this _kind of_ works: pipenv install -e ../../lib/python

It adds another entry into the Pipefile like this:

"-e ../../lib/python" = "*"

I can see that the package is installed properly by running pipenv run python and importing the package. In addition, doing a pipenv shell followed by a pip freeze shows:

-e [email protected]:WPMedia/heliograf.git@4dbd528e2f2daeb4b4462b29d2dc8c54341428b5#egg=heliograf&subdirectory=lib/python

potentially related issues:

versions:

  • python version: 3.6.2
  • pipenv version: 7.0.1
  • python installed via: pyenv
reported bug

All 46 comments

The actual problem you're experiencing seems to be that you have a setup.py file somewhere with an explicit pinned dependency on a version of heliograf that doesn't exist in a repository pipenv can query. This is fine, because you have that package installed and you claim it is the right version, but note that even pip doesn't know which version it is because it is installed from VCS. I'm not sure this is a pipenv issue.

try using an absolute path instead, see if that changes anything

@techalchemy I think you misunderstand - this isn't a published package anywhere, it isn't installed directly from VCS, its installed from a relative path to my project. I don't intend to pin any specific version, I just want it installed as an editable package.

@kennethreitz that fixed it! I'd love to continue using a relative path in the Pipefile so I can use the same Pipfile with my collaborators. I also noticed that the Pipefile seemed to lowercase the whole filepath but that didn't affect anything.

@AlJohri ah ok I misunderstood indeed, so it's attributing the following version pinning to the editable VCS version?

-e ../../lib/python
arrow==0.10.0

Is interpreted as -e ../../lib/python == 0.10.0?

As pipenv is a dependency manager I'm not sure it's a good idea to use relative paths with it.. the idea is to have a portable Pipfile, to any degree possible, without restricting the ability to still install stuff. I think we can resolve this by enforcing absolute filepaths, I'll look into it in a bit.

I use 'enforcement' loosely, I really mean 'resolution' -- we can resolve the paths when we either lock or do dependency resolutions or both

I think we should allow relative paths here, just not encourage their use.

Maybe even issue a warning that it's likely a bad idea.

I rely on them pretty heavily in my "multi-app with shared library" repositories for storing utility functions, exceptions, maybe some data structures etc.

Why are they a bad idea?

Get Outlook for iOShttps://aka.ms/o0ukef


From: Kenneth Reitz notifications@github.com
Sent: Thursday, September 14, 2017 11:23:53 AM
To: kennethreitz/pipenv
Cc: Al Johri; Mention
Subject: Re: [kennethreitz/pipenv] issues with relative packages (#540)

Maybe even issue a warning that it's likely a bad idea.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/kennethreitz/pipenv/issues/540#issuecomment-329517307, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACqSzEBc-iqXr5t0PbfDeM2xVNSRWBMTks5siUUJgaJpZM4PW4KW.

I also find it hugely useful as an alternative to mucking around with PYTHONPATH or doing weird "import site; site.insert..." hacks and instead running "pip install -e" on a bunch of packages and now voila you can use them in your Jupyter notebooks and scripts that may happen to be in a different folder.

Yeah, you know what you're doing. They're a bad idea for people that don't know what they're doing, basically.

@kennethreitz I'm not suggesting not to allow them, just to convert them when we resolve them

yeah, i don't think a lockfile should ever contain relative paths. that's dangerous territory.

unless they're within the codebase

we only support absolute paths for now

Context: We spent a good chunk of time on this today. It isn't straightforward when 'locking' dependencies, hashing paths, installing, etc. The recommended approach would be to use pip directly if you need a relative path or to use an absolute path.

thanks for looking into this @kennethreitz @techalchemy! is there any chance to just save the dependency to the Pipfile without any hashing or locking etc.? I'd like to ideally tell my users / collaborators to "just run" pipenv install.

I can wrap the pipenv install following by a pip install in a script otherwise for now

this is probably something we can implement although I think we are going to be slowing down release cycles here.

@kennethreitz My proposal for a solution would be to just add an extra check to see if something is a file and, if so, resolve its absolute path upon locking.

@kennethreitz should this issue be kept open for now?

Got a new error now:

$ pipenv install -e ../../lib/python
Installing -e ../../lib/python…
Obtaining file:///Users/johria/Development/heliograf/lib/python
Installing collected packages: heliograf
  Found existing installation: heliograf 0.1.0
    Uninstalling heliograf-0.1.0:
      Successfully uninstalled heliograf-0.1.0
  Running setup.py develop for heliograf
Successfully installed heliograf

Adding -e ../../lib/python to Pipfile's [packages]…
Locking [dev-packages] dependencies…
Traceback (most recent call last):
  File "/Users/johria/.pyenv/versions/3.6.0/bin/pipenv", line 11, in <module>
    sys.exit(cli())
  File "/Users/johria/.pyenv/versions/3.6.0/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/johria/.pyenv/versions/3.6.0/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/johria/.pyenv/versions/3.6.0/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/johria/.pyenv/versions/3.6.0/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/johria/.pyenv/versions/3.6.0/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/johria/.pyenv/versions/3.6.0/lib/python3.6/site-packages/pipenv/cli.py", line 1434, in install
    do_lock(system=system)
  File "/Users/johria/.pyenv/versions/3.6.0/lib/python3.6/site-packages/pipenv/cli.py", line 852, in do_lock
    deps = convert_deps_to_pip(project.dev_packages, r=False)
  File "/Users/johria/.pyenv/versions/3.6.0/lib/python3.6/site-packages/pipenv/project.py", line 252, in dev_packages
    for k, v in self.parsed_pipfile.get('dev-packages', {}).items():
  File "/Users/johria/.pyenv/versions/3.6.0/lib/python3.6/site-packages/pipenv/project.py", line 176, in parsed_pipfile
    return contoml.loads(f.read())
  File "/Users/johria/.pyenv/versions/3.6.0/lib/python3.6/site-packages/pipenv/patched/contoml/__init__.py", line 15, in loads
    elements = parse_tokens(tokens)
  File "/Users/johria/.pyenv/versions/3.6.0/lib/python3.6/site-packages/pipenv/patched/prettytoml/parser/__init__.py", line 17, in parse_tokens
    return _parse_token_stream(TokenStream(tokens))
  File "/Users/johria/.pyenv/versions/3.6.0/lib/python3.6/site-packages/pipenv/patched/prettytoml/parser/__init__.py", line 32, in _parse_token_stream
    raise ParsingError('Failed to parse line {}'.format(pending.head.row))
prettytoml.parser.errors.ParsingError: Failed to parse line 41

This line was added to my Pipfile:

1308583 = {file = "../../lib/python", editable = true}

Using this workaround for now: pipenv run pip install -e ../../lib/python

I don't suppose you're going to tell us whether that actually is what is on line 41 of your Pipfile ?

In the meantime, can you show us the output of pipenv version and start using --verbose with pipenv install

On Sep 17, 2017, at 10:47 PM, Al Johri notifications@github.com wrote:

Got a new error now:

$ pipenv install -e ../../lib/python
Installing -e ../../lib/python…
Obtaining file:///Users/johria/Development/heliograf/lib/python
Installing collected packages: heliograf
Found existing installation: heliograf 0.1.0
Uninstalling heliograf-0.1.0:
Successfully uninstalled heliograf-0.1.0
Running setup.py develop for heliograf
Successfully installed heliograf

Adding -e ../../lib/python to Pipfile's [packages]…
Locking [dev-packages] dependencies…
Traceback (most recent call last):
File "/Users/johria/.pyenv/versions/3.6.0/bin/pipenv", line 11, in
sys.exit(cli())
File "/Users/johria/.pyenv/versions/3.6.0/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
return self.main(args, *kwargs)
File "/Users/johria/.pyenv/versions/3.6.0/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/Users/johria/.pyenv/versions/3.6.0/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/johria/.pyenv/versions/3.6.0/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, *ctx.params)
File "/Users/johria/.pyenv/versions/3.6.0/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
return callback(
args, **kwargs)
File "/Users/johria/.pyenv/versions/3.6.0/lib/python3.6/site-packages/pipenv/cli.py", line 1434, in install
do_lock(system=system)
File "/Users/johria/.pyenv/versions/3.6.0/lib/python3.6/site-packages/pipenv/cli.py", line 852, in do_lock
deps = convert_deps_to_pip(project.dev_packages, r=False)
File "/Users/johria/.pyenv/versions/3.6.0/lib/python3.6/site-packages/pipenv/project.py", line 252, in dev_packages
for k, v in self.parsed_pipfile.get('dev-packages', {}).items():
File "/Users/johria/.pyenv/versions/3.6.0/lib/python3.6/site-packages/pipenv/project.py", line 176, in parsed_pipfile
return contoml.loads(f.read())
File "/Users/johria/.pyenv/versions/3.6.0/lib/python3.6/site-packages/pipenv/patched/contoml/__init__.py", line 15, in loads
elements = parse_tokens(tokens)
File "/Users/johria/.pyenv/versions/3.6.0/lib/python3.6/site-packages/pipenv/patched/prettytoml/parser/__init__.py", line 17, in parse_tokens
return _parse_token_stream(TokenStream(tokens))
File "/Users/johria/.pyenv/versions/3.6.0/lib/python3.6/site-packages/pipenv/patched/prettytoml/parser/__init__.py", line 32, in _parse_token_stream
raise ParsingError('Failed to parse line {}'.format(pending.head.row))
prettytoml.parser.errors.ParsingError: Failed to parse line 41
This line was added to my Pipfile:

1308583 = {file = "../../lib/python", editable = true}
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@techalchemy sorry if that wasn't clear; the line I posted below the stack trace starting with 1308583 is line 41

  • pipenv version: 7.2.6
$ pipenv install --verbose -e ../../lib/python
Installing -e ../../lib/python…
â ‹$ "/Users/johria/.local/share/virtualenvs/api-IzJWx2po/bin/pip" install   -e "../../lib/python" -i https://pypi.python.org/simple --exists-action w
Obtaining file:///Users/johria/Development/heliograf/lib/python
Installing collected packages: heliograf
  Found existing installation: heliograf 0.1.0
    Uninstalling heliograf-0.1.0:
      Successfully uninstalled heliograf-0.1.0
  Running setup.py develop for heliograf
Successfully installed heliograf

Adding -e ../../lib/python to Pipfile's [packages]…
Locking [dev-packages] dependencies…
Traceback (most recent call last):
  File "/Users/johria/.pyenv/versions/3.6.2/bin/pipenv", line 11, in <module>
    sys.exit(cli())
  File "/Users/johria/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/johria/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/johria/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/johria/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/johria/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/johria/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/cli.py", line 1434, in install
    do_lock(system=system)
  File "/Users/johria/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/cli.py", line 852, in do_lock
    deps = convert_deps_to_pip(project.dev_packages, r=False)
  File "/Users/johria/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/project.py", line 252, in dev_packages
    for k, v in self.parsed_pipfile.get('dev-packages', {}).items():
  File "/Users/johria/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/project.py", line 176, in parsed_pipfile
    return contoml.loads(f.read())
  File "/Users/johria/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/patched/contoml/__init__.py", line 15, in loads
    elements = parse_tokens(tokens)
  File "/Users/johria/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/patched/prettytoml/parser/__init__.py", line 17, in parse_tokens
    return _parse_token_stream(TokenStream(tokens))
  File "/Users/johria/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/patched/prettytoml/parser/__init__.py", line 32, in _parse_token_stream
    raise ParsingError('Failed to parse line {}'.format(pending.head.row))
prettytoml.parser.errors.ParsingError: Failed to parse line 41

Full Pipfile:

[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true

[requires]
python_version = "3.6"

[packages]

arrow = "==0.10.0"
blessings = "==1.6"
boto3 = "==1.4.7"
coreapi = "==2.3.1"
datadog = "==0.16.0"
dj-database-url = "==0.4.2"
django-codemirror-widget = "==0.4.1"
django-cors-headers = "==2.1.0"
django-debug-toolbar = "==1.8"
django-extensions = "==1.9.0"
django-filter = "==1.0.4"
django-object-actions = "==0.10.0"
django = "==1.11.5"
djangorestframework-filters = "==0.10.1"
djangorestframework = "==3.6.4"
drf-nested-routers = "==0.90.0"
envdir = "==0.7"
jinja2 = {git = "https://github.com/pallets/jinja"}
htmlmin = "==0.1.10"
jinja2-pluralize = "==0.3.0"
newrelic = "==2.92.0.78"
psycopg2 = "==2.7.3.1"
pytest = "==3.2.2"
raven = "==6.1.0"
slackclient = "==1.0.9"
slacker = "==0.9.60"
toolz = "==0.8.2"
tweepy = "==3.5.0"
uwsgi = "==2.0.15"
whitenoise = "==4.0b3"
django-tinymce4-lite = {git = "https://github.com/romanvm/django-tinymce4-lite", ref = "develop"}
1308583 = {file = "../../lib/python", editable = true}

[dev-packages]

yq = "*"
jira-cli = "*"
ipython = "*"

Line 41 is the line that starts with 1308583

we only support absolute paths for now

@kennethreitz I tried using an absolute path but I'm still running into issues. I'm using pipenv 7.3.7.

$ pipenv install -e /Users/johria/Development/heliograf/lib/python/
Installing -e /Users/johria/Development/heliograf/lib/python/…
Obtaining file:///Users/johria/Development/heliograf/lib/python
Installing collected packages: heliograf
  Found existing installation: heliograf 0.1.0
    Uninstalling heliograf-0.1.0:
      Successfully uninstalled heliograf-0.1.0
  Running setup.py develop for heliograf
Successfully installed heliograf

Adding -e /Users/johria/Development/heliograf/lib/python/ to Pipfile's [packages]…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Traceback (most recent call last):
  File "/Users/johria/.pyenv/versions/3.6.2/bin/pipenv", line 11, in <module>
    sys.exit(cli())
  File "/Users/johria/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/johria/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/johria/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/johria/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/johria/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/johria/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/cli.py", line 1532, in install
    do_lock(system=system)
  File "/Users/johria/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/cli.py", line 951, in do_lock
    project=project
  File "/Users/johria/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/utils.py", line 188, in resolve_deps
    constraint = pip.req.InstallRequirement.from_editable(dep[len('-e '):])
  File "/Users/johria/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/patched/pip/req/req_install.py", line 144, in from_editable
    editable_req, default_vcs)
  File "/Users/johria/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/patched/pip/req/req_install.py", line 1183, in parse_editable
    editable_req
pip.exceptions.InstallationError: /users/johria/development/heliograf/lib/python/ should either be a path to a local project or a VCS url beginning with svn+, git+, hg+, or bzr+

@kennethreitz should this issue be re-opened? the issue exists with absolute paths as well

happy to help if you point me in a direction :)

this is working fine for me in my tests

okay, I'll test again and create a reproducible example otherwise

@AlJohri try without the trailing slash and see if it works, can't remember how we test

I feel this is a race condition relating to the fact that your package is called 'python'. If you were installing a git URI you would be installing a package called python.git. Instead you're using a file URI. Same difference. Use a better naming convention and try again.

On Sep 20, 2017, at 11:57 PM, Al Johri notifications@github.com wrote:

okay, I'll test again and create a reproducible example otherwise

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@techalchemy I changed my naming convention and removed the trailing slash but still ran into the error with an absolute path. I'm using pipenv 7.4.4.

does it have to do with the lowercasing of the filepath?

$ pipenv install -e /Users/johria/Development/heliograf/lib/python/heliograf

resulted in

Installing -e /Users/johria/Development/heliograf/lib/python/heliograf…
Obtaining file:///Users/johria/Development/heliograf/lib/python/heliograf
Installing collected packages: heliograf
  Found existing installation: heliograf 0.1.0
    Uninstalling heliograf-0.1.0:
      Successfully uninstalled heliograf-0.1.0
  Running setup.py develop for heliograf
Successfully installed heliograf

Adding -e /Users/johria/Development/heliograf/lib/python/heliograf to Pipfile's [packages]…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Traceback (most recent call last):
  File "/Users/johria/.pyenv/versions/3.6.2/bin/pipenv", line 11, in <module>
    load_entry_point('pipenv', 'console_scripts', 'pipenv')()
  File "/Users/johria/Development/pipenv/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/johria/Development/pipenv/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/johria/Development/pipenv/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/johria/Development/pipenv/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/johria/Development/pipenv/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/johria/Development/pipenv/pipenv/cli.py", line 1555, in install
    do_lock(system=system)
  File "/Users/johria/Development/pipenv/pipenv/cli.py", line 965, in do_lock
    project=project
  File "/Users/johria/Development/pipenv/pipenv/utils.py", line 380, in resolve_deps
    constraint = pip.req.InstallRequirement.from_editable(dep[len('-e '):])
  File "/Users/johria/Development/pipenv/pipenv/patched/pip/req/req_install.py", line 144, in from_editable
    editable_req, default_vcs)
  File "/Users/johria/Development/pipenv/pipenv/patched/pip/req/req_install.py", line 1183, in parse_editable
    editable_req
pip.exceptions.InstallationError: /users/johria/development/heliograf/lib/python/heliograf should either be a path to a local project or a VCS url beginning with svn+, git+, hg+, or bzr+

directory structure:

$ tree -L 1 /Users/johria/Development/heliograf/lib/python/heliograf
/Users/johria/Development/heliograf/lib/python/heliograf
├── README.rst
├── heliograf
├── heliograf.egg-info
└── setup.py

2 directories, 2 files

setup.py file:

$ cat /Users/johria/Development/heliograf/lib/python/heliograf/setup.py
#!/usr/bin/env python3

from setuptools import setup, find_packages

readme = open('README.rst').read()

setup(
    name='heliograf',
    version='0.1.0',
    description='Python library for heliograf.',
    long_description=readme,
    author='xyz',
    author_email='xyz',
    url='https://github.com/WPMedia/heliograf/tree/master/lib/python/',
    packages=find_packages(),
    classifiers=[
        'Programming Language :: Python :: 3 :: Only',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'License :: OSI Approved :: MIT License',
    ]
)

So for whatever reason the path we are passing the resolver for do_lock() is different from the path we put in the Pipfile and actually install... The installed path is an actual file:// URI but the one we are trying to lock is an absolute path on your OS...

Nope, I'm lying. It's lowercasing your path when it tries to lock.

This may be fixed by 4638701c

should be fixed now :)

still seems like its being lowercased? I tried to verify I have the latest version from VCS

$ pip install --upgrade git+https://github.com/kennethreitz/pipenv
Collecting git+https://github.com/kennethreitz/pipenv
...
Successfully installed pipenv-7.4.4
$ pip show pipenv
...
Location: /Users/johria/.pyenv/versions/3.6.2/lib/python3.6/site-packages
...
$ cat /Users/johria/.pyenv/versions/3.6.2/lib/python3.6/site-packages/pipenv/project.py | grep "We may need this later.."
        # We may need this later...
$ pipenv install -e /Users/johria/Development/heliograf/lib/python/heliograf

same error:

pip.exceptions.InstallationError: /users/johria/development/heliograf/lib/python/heliograf should either be a path to a local project or a VCS url beginning with svn+, git+, hg+, or bzr+

i actually just fixed the thing, spoke too soon

need to make sure if works with paths too

try with latest release

@kennethreitz didn't seem to work, still lowercasing:

$ pip install --upgrade git+https://github.com/kennethreitz/pipenv
$ pipenv install -e /Users/johria/Development/heliograf/lib/python/heliograf --verbose
pip.exceptions.InstallationError: /users/johria/development/heliograf/lib/python/heliograf should either be a path to a local project or a VCS url beginning with svn+, git+, hg+, or bzr+

did you use latest?

you need to re-lock

just use relative paths now, they should work fine.

I ran:

$ pip install --upgrade git+https://github.com/kennethreitz/pipenv
$ pipenv lock
$ pipenv install
$ pipenv install -e ../../lib/python/heliograf

And it worked! 🎉 Does the Pipfile.lock diff look correct? I see the addition of both ec98b80 and heliograf with version 0.1.0.

Pipfile.lock

diff --git a/apps/api/Pipfile.lock b/apps/api/Pipfile.lock
index af52adc..3359be0 100644
--- a/apps/api/Pipfile.lock
+++ b/apps/api/Pipfile.lock
@@ -189,6 +189,10 @@
             ],
             "version": "==0.90.0"
         },
+        "ec98b80": {
+            "editable": true,
+            "path": "../../lib/python/heliograf"
+        },
         "envdir": {
             "hashes": [
                 "sha256:af5f012e09360cd9af4631fe963872f76a6bf4f08da9c07b3395511a56614bfa",
@@ -196,6 +200,10 @@
             ],
             "version": "==0.7"
         },
+        "heliograf": {
+            "hashes": [],
+            "version": "==0.1.0"
+        },
         "htmlmin": {
             "hashes": [
                 "sha256:645fdd70615bd120f8b110dfaf93f9b201c88ee7899dc5a4c51ca3ffe004b3a5",

Pipfile

diff --git a/apps/api/Pipfile b/apps/api/Pipfile
index d5f0e20..6138972 100644
--- a/apps/api/Pipfile
+++ b/apps/api/Pipfile
@@ -38,6 +38,7 @@ tweepy = "*"
 uwsgi = "*"
 whitenoise = "==4.0b3"
 django-tinymce4-lite = {git = "https://github.com/romanvm/django-tinymce4-lite", ref = "develop"}
+ec98b80 = {path = "../../lib/python/heliograf", editable = true}

 [dev-packages]

Hm so it has added an entry for both the package name as well as the hash? that is probably bad

oh yeah, we resolve those...

technically correct.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jacebrowning picture jacebrowning  Â·  3Comments

konstin picture konstin  Â·  3Comments

FooBarQuaxx picture FooBarQuaxx  Â·  3Comments

jacek-jablonski picture jacek-jablonski  Â·  3Comments

hynek picture hynek  Â·  3Comments