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

YAML module missing after pipenv install #94

Closed
selpan opened this issue Feb 20, 2020 · 1 comment
Closed

YAML module missing after pipenv install #94

selpan opened this issue Feb 20, 2020 · 1 comment
Assignees
Labels
bug Something isn't working python Python

Comments

@selpan
Copy link
Contributor

selpan commented Feb 20, 2020

Using pipenv to install the packages for cloudendure-python and trying to run the CLI commands throws an error for a missing module.

nselpa at pa-ps-mac-0508 in ~/gitrepos/cloudendure-python on master
$ pipenv install
Creating a virtualenv for this project…
Pipfile: /Users/nselpa/gitrepos/cloudendure-python/Pipfile
Using /usr/local/bin/python3 (3.7.6) to create virtualenv…
⠇ Creating virtual environment...Already using interpreter /usr/local/opt/python/bin/python3.7
Using base prefix '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7'
New python executable in /Users/nselpa/.local/share/virtualenvs/cloudendure-python-4DQesPY7/bin/python3.7
Also creating executable in /Users/nselpa/.local/share/virtualenvs/cloudendure-python-4DQesPY7/bin/python
Installing setuptools, pip, wheel...
done.
Running virtualenv with interpreter /usr/local/bin/python3

✔ Successfully created virtual environment! 
Virtualenv location: /Users/nselpa/.local/share/virtualenvs/cloudendure-python-4DQesPY7
Installing dependencies from Pipfile.lock (bb2ed3)…
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 25/25 — 00:01:02

nselpa at pa-ps-mac-0508 in ~/gitrepos/cloudendure-python on master
$ pipenv run ce
Traceback (most recent call last):
  File "/Users/nselpa/.local/share/virtualenvs/cloudendure-python-4DQesPY7/bin/ce", line 11, in <module>
    load_entry_point('cloudendure', 'console_scripts', 'ce')()
  File "/Users/nselpa/.local/share/virtualenvs/cloudendure-python-4DQesPY7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 490, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/Users/nselpa/.local/share/virtualenvs/cloudendure-python-4DQesPY7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2854, in load_entry_point
    return ep.load()
  File "/Users/nselpa/.local/share/virtualenvs/cloudendure-python-4DQesPY7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2445, in load
    return self.resolve()
  File "/Users/nselpa/.local/share/virtualenvs/cloudendure-python-4DQesPY7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2451, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/Users/nselpa/gitrepos/cloudendure-python/cloudendure/cloudendure.py", line 18, in <module>
    from .api import CloudEndureAPI
  File "/Users/nselpa/gitrepos/cloudendure-python/cloudendure/api.py", line 24, in <module>
    from cloudendure.config import CloudEndureConfig
  File "/Users/nselpa/gitrepos/cloudendure-python/cloudendure/config.py", line 10, in <module>
    import yaml
ModuleNotFoundError: No module named 'yaml'

nselpa at pa-ps-mac-0508 in ~/gitrepos/cloudendure-python on master
$ 

Adding pyyaml to the Pipfile's [packages] section results in a successful run:

nselpa at pa-ps-mac-0508 in ~/gitrepos/cloudendure-python on master
$ vi Pipfile

nselpa at pa-ps-mac-0508 in ~/gitrepos/cloudendure-python on master [!]
$ pipenv install
Pipfile.lock (f49ee6) out of date, updating to (bb2ed3)…
Locking [dev-packages] dependencies…
✔ Success! 
Locking [packages] dependencies…
✔ Success! 
Updated Pipfile.lock (f49ee6)!
Installing dependencies from Pipfile.lock (f49ee6)…
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 26/26 — 00:00:41

nselpa at pa-ps-mac-0508 in ~/gitrepos/cloudendure-python on master [!]
$ cloudendure
bash: cloudendure: command not found

nselpa at pa-ps-mac-0508 in ~/gitrepos/cloudendure-python on master [!]
$ pipenv run cloudendure
You must configure your authentication credentials!
Failed to authenticate with CloudEndure! Please check your credentials and try again!

nselpa at pa-ps-mac-0508 in ~/gitrepos/cloudendure-python on master [!]
$ 

A PR with the updated Pipfile and Pipfile.lock files to address the issue will be provided.

@mbeacom
Copy link
Contributor

mbeacom commented Feb 21, 2020

This issue was resolving in #95

@mbeacom mbeacom added bug Something isn't working python Python labels Feb 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working python Python
Projects
None yet
Development

No branches or pull requests

2 participants