Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pipenv -e fails to install local package. pip -e works. #1028

Closed
marc-fez opened this issue Nov 3, 2017 · 3 comments
Closed

pipenv -e fails to install local package. pip -e works. #1028

marc-fez opened this issue Nov 3, 2017 · 3 comments

Comments

@marc-fez
Copy link

marc-fez commented Nov 3, 2017

Be sure to check the existing issues, both open and closed.

Describe the issue briefly here.

Describe your environment
  1. OS Type: Ubuntu Artful 17.10
  2. Python version: Python 3.6.3
  3. Pipenv version: pipenv, version 8.3.1
Expected result

Expected local package to be installed similar to pip.

Actual result

$ pipenv install -e /home/marc/opencompliance/opencompliance/scrapers/libsanctions --verbose

Installing -e /home/marc/opencompliance/opencompliance/scrapers/libsanctions…
⠋Installing '-e /home/marc/opencompliance/opencompliance/scrapers/libsanctions'
$ "/home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/bin/pip" install --verbose -e "/home/marc/opencompliance/opencompliance/scrapers/libsanctions" -i https://pypi.python.org/simple --exists-action w
Traceback (most recent call last):
File "/home/marc/.local/bin/pipenv", line 11, in
sys.exit(cli())
File "/home/marc/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 722, in call
return self.main(*args, **kwargs)
File "/home/marc/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/home/marc/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/marc/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/marc/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/marc/.local/lib/python3.6/site-packages/pipenv/cli.py", line 1869, in install
converted = convert_deps_from_pip(package_name)
File "/home/marc/.local/lib/python3.6/site-packages/pipenv/utils.py", line 540, in convert_deps_from_pip
os.path.isfile(req.name)) and not req.vcs:
File "/usr/lib/python3.6/genericpath.py", line 30, in isfile
st = os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

Steps to replicate

use pipenv -e to install local package with setup.py file. this is the package i'm trying to install.
https://github.com/marc-fez/libsanctions.git

pip -e works with this package.

$ pip install -e /home/marc/opencompliance/opencompliance/scrapers/libsanctions --verbose
Obtaining file:///home/marc/opencompliance/opencompliance/scrapers/libsanctions
Running setup.py (path:/home/marc/opencompliance/opencompliance/scrapers/libsanctions/setup.py) egg_info for package from file:///home/marc/opencompliance/opencompliance/scrapers/libsanctions
Running command python setup.py egg_info
running egg_info
writing libsanctions.egg-info/PKG-INFO
writing dependency_links to libsanctions.egg-info/dependency_links.txt
writing namespace_packages to libsanctions.egg-info/namespace_packages.txt
writing requirements to libsanctions.egg-info/requires.txt
writing top-level names to libsanctions.egg-info/top_level.txt
reading manifest file 'libsanctions.egg-info/SOURCES.txt'
writing manifest file 'libsanctions.egg-info/SOURCES.txt'
Source in /home/marc/opencompliance/opencompliance/scrapers/libsanctions has version 0.1.0, which satisfies requirement libsanctions==0.1.0 from file:///home/marc/opencompliance/opencompliance/scrapers/libsanctions
Requirement already satisfied: normality>=0.4.2 in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from libsanctions==0.1.0)
Requirement already satisfied: fingerprints>=0.4.0 in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from libsanctions==0.1.0)
Requirement already satisfied: countrynames in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from libsanctions==0.1.0)
Requirement already satisfied: jsonschema>=2.6.0 in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from libsanctions==0.1.0)
Requirement already satisfied: sqlalchemy>=1.1.0 in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from libsanctions==0.1.0)
Requirement already satisfied: requests>=2.13 in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from libsanctions==0.1.0)
Requirement already satisfied: morphium in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from libsanctions==0.1.0)
Requirement already satisfied: dalet in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from libsanctions==0.1.0)
Requirement already satisfied: lxml in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from libsanctions==0.1.0)
Requirement already satisfied: xlrd in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from libsanctions==0.1.0)
Requirement already satisfied: six in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from libsanctions==0.1.0)
Requirement already satisfied: chardet in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from normality>=0.4.2->libsanctions==0.1.0)
Requirement already satisfied: banal in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from normality>=0.4.2->libsanctions==0.1.0)
Requirement already satisfied: unidecode in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from fingerprints>=0.4.0->libsanctions==0.1.0)
Requirement already satisfied: pyyaml in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from fingerprints>=0.4.0->libsanctions==0.1.0)
Requirement already satisfied: pycountry in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from countrynames->libsanctions==0.1.0)
Requirement already satisfied: python-Levenshtein in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from countrynames->libsanctions==0.1.0)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from requests>=2.13->libsanctions==0.1.0)
Requirement already satisfied: idna<2.7,>=2.5 in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from requests>=2.13->libsanctions==0.1.0)
Requirement already satisfied: certifi>=2017.4.17 in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from requests>=2.13->libsanctions==0.1.0)
Requirement already satisfied: boto3 in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from morphium->libsanctions==0.1.0)
Requirement already satisfied: babel>=2.5.1 in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from dalet->libsanctions==0.1.0)
Requirement already satisfied: parsedatetime>=2.1 in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from dalet->libsanctions==0.1.0)
Requirement already satisfied: urltools>=0.3.2 in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from dalet->libsanctions==0.1.0)
Requirement already satisfied: phonenumbers>=8.8.4 in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from dalet->libsanctions==0.1.0)
Requirement already satisfied: setuptools in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from python-Levenshtein->countrynames->libsanctions==0.1.0)
Requirement already satisfied: botocore<1.8.0,>=1.7.0 in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from boto3->morphium->libsanctions==0.1.0)
Requirement already satisfied: s3transfer<0.2.0,>=0.1.10 in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from boto3->morphium->libsanctions==0.1.0)
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from boto3->morphium->libsanctions==0.1.0)
Requirement already satisfied: pytz>=0a in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from babel>=2.5.1->dalet->libsanctions==0.1.0)
Requirement already satisfied: future in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from parsedatetime>=2.1->dalet->libsanctions==0.1.0)
Requirement already satisfied: docutils>=0.10 in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from botocore<1.8.0,>=1.7.0->boto3->morphium->libsanctions==0.1.0)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages (from botocore<1.8.0,>=1.7.0->boto3->morphium->libsanctions==0.1.0)
Installing collected packages: libsanctions
Running setup.py develop for libsanctions
Running command /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/bin/python3 -c "import setuptools, tokenize;file='/home/marc/opencompliance/opencompliance/scrapers/libsanctions/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" develop --no-deps
running develop
running egg_info
writing libsanctions.egg-info/PKG-INFO
writing dependency_links to libsanctions.egg-info/dependency_links.txt
writing namespace_packages to libsanctions.egg-info/namespace_packages.txt
writing requirements to libsanctions.egg-info/requires.txt
writing top-level names to libsanctions.egg-info/top_level.txt
reading manifest file 'libsanctions.egg-info/SOURCES.txt'
writing manifest file 'libsanctions.egg-info/SOURCES.txt'
running build_ext
Creating /home/marc/.local/share/virtualenvs/libsanctions-VUOiacvt/lib/python3.6/site-packages/libsanctions.egg-link (link to .)
Adding libsanctions 0.1.0 to easy-install.pth file

Installed /home/marc/opencompliance/opencompliance/scrapers/libsanctions

Successfully installed libsanctions
Cleaning up...

@techalchemy
Copy link
Member

techalchemy commented Nov 3, 2017

Thanks for the report, @marc-fez - this is a known issue and there is a patch in #958 coming soon. In the meantime if you are using absolute paths you can work around this by simply changing them to file:// URIs so in this case pipenv install -e file:///home/marc/opencompliance/opencompliance/scrapers/libsanctions/

@techalchemy
Copy link
Member

techalchemy commented Nov 3, 2017

I’m going to go ahead and close this as we already have several issues tracking this bug (see #939 #960 #936 etc)

techalchemy added a commit to techalchemy/pipenv that referenced this issue Nov 14, 2017
@techalchemy
Copy link
Member

This is now resolved in #958

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants