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

docker image seems to have issues with pipenv #525

Open
vvsiva007 opened this issue Oct 8, 2020 · 3 comments
Open

docker image seems to have issues with pipenv #525

vvsiva007 opened this issue Oct 8, 2020 · 3 comments

Comments

@vvsiva007
Copy link

mightybuilder@de08eee6458b:~/cmake-cookbook$ pipenv install --three
Virtualenv already exists!
Removing existing virtualenv...
Creating a virtualenv for this project...
Pipfile: /home/mightybuilder/cmake-cookbook/Pipfile
Using /opt/conda/bin/python3 (3.6.6) to create virtualenv...
⠋Running virtualenv with interpreter /opt/conda/bin/python3
Using base prefix '/opt/conda'
New python executable in /home/mightybuilder/.local/share/virtualenvs/cmake-cookbook-3GSOBQuY/bin/python3
Also creating executable in /home/mightybuilder/.local/share/virtualenvs/cmake-cookbook-3GSOBQuY/bin/python
Installing setuptools, pip, wheel...done.
Setting project for cmake-cookbook-3GSOBQuY to /home/mightybuilder/cmake-cookbook

Virtualenv location: /home/mightybuilder/.local/share/virtualenvs/cmake-cookbook-3GSOBQuY Installing dependencies from Pipfile.lock (096ebe)...
An error occurred while installing markupsafe==1.0! Will try again.
🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 27/27 — 00:00:08
Installing initially failed dependencies...
Looking in indexes: https://pypi.python.org/simple00
Collecting markupsafe==1.0
Using cached MarkupSafe-1.0.tar.gz (14 kB)

**ERROR: Command errored out with exit status 1:
 command: /home/mightybuilder/.local/share/virtualenvs/cmake-cookbook-3GSOBQuY/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-l0dmavax/markupsafe/setup.py'"'"'; __file__='"'"'/tmp/pip-install-l0dmavax/markupsafe/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-qu0p6tm3
     cwd: /tmp/pip-install-l0dmavax/markupsafe/
Complete output (5 lines):
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-install-l0dmavax/markupsafe/setup.py", line 6, in <module>
    from setuptools import setup, Extension, Feature
ImportError: cannot import name 'Feature'
----------------------------------------

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.**

☤ ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/1 — 00:00:01
mightybuilder@de08eee6458b:~/cmake-cookbook$

@seancwall
Copy link

seancwall commented Apr 22, 2021

Yes, I experienced the same issue running the devcafe/cmake-cookbook_ubuntu-18.04 Docker image on macOS.

@jieli-matrix
Copy link

The command errored out since it failed to install markupsafe==1.0.
You could reinstall markupsafe successfully by commands as following

pipenv install pip=9.0.1
pipenv install setuptools==45.2.0

Then pipenv would update Pipefile and Pipefile.lock automatically.
Test it by the cases in chapter-12/recipe-02

mightybuilder@3f66e995f53d:~/cmake-cookbook$ pipenv run python testing/collet_tests.py 'chapter-12/recipe-02'
/home/mightybuilder/.local/share/virtualenvs/cmake-cookbook-3GSOBQuY/bin/python: can't open file 'testing/collet_tests.py': [Errno 2] No such file or directory
mightybuilder@3f66e995f53d:~/cmake-cookbook$ pipenv run python testing/collect_tests.py 'chapter-12/recipe-02'

recipe: Building documentation using Sphinx

  /home/mightybuilder/cmake-cookbook/chapter-12/recipe-02/cxx-example
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_C_COMPILER
    CMAKE_Fortran_COMPILER


  configuring ... OK
  building configuration Debug ... OK
  docs configuration Debug ... OK

If markupsafe couldn't be installed successfully, the docs configuration Debug would fail.

/home/mightybuilder/cmake-cookbook/chapter-12/recipe-02/cxx-example
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_C_COMPILER
    CMAKE_Fortran_COMPILER


  configuring ... OK
  building configuration Debug ... OK
Traceback (most recent call last):
  File "/home/mightybuilder/.local/share/virtualenvs/cmake-cookbook-3GSOBQuY/bin/sphinx-build", line 5, in <module>
    from sphinx.cmd.build import main
  File "/home/mightybuilder/.local/share/virtualenvs/cmake-cookbook-3GSOBQuY/lib/python3.6/site-packages/sphinx/cmd/build.py", line 25, in <module>
    from sphinx.application import Sphinx
  File "/home/mightybuilder/.local/share/virtualenvs/cmake-cookbook-3GSOBQuY/lib/python3.6/site-packages/sphinx/application.py", line 48, in <module>
    from sphinx.util.tags import Tags
  File "/home/mightybuilder/.local/share/virtualenvs/cmake-cookbook-3GSOBQuY/lib/python3.6/site-packages/sphinx/util/tags.py", line 11, in <module>
    from jinja2 import nodes
  File "/home/mightybuilder/.local/share/virtualenvs/cmake-cookbook-3GSOBQuY/lib/python3.6/site-packages/jinja2/__init__.py", line 33, in <module>
    from jinja2.environment import Environment, Template
  File "/home/mightybuilder/.local/share/virtualenvs/cmake-cookbook-3GSOBQuY/lib/python3.6/site-packages/jinja2/environment.py", line 15, in <module>
    from jinja2 import nodes
  File "/home/mightybuilder/.local/share/virtualenvs/cmake-cookbook-3GSOBQuY/lib/python3.6/site-packages/jinja2/nodes.py", line 19, in <module>
    from jinja2.utils import Markup
  File "/home/mightybuilder/.local/share/virtualenvs/cmake-cookbook-3GSOBQuY/lib/python3.6/site-packages/jinja2/utils.py", line 647, in <module>
    from markupsafe import Markup, escape, soft_unicode
ModuleNotFoundError: No module named 'markupsafe'
make[3]: *** [CMakeFiles/docs] Error 1
make[2]: *** [CMakeFiles/docs.dir/all] Error 2
make[1]: *** [CMakeFiles/docs.dir/rule] Error 2
make: *** [docs] Error 2
  docs configuration Debug ... FAILED
cmake --build "/home/mightybuilder/cmake-cookbook/chapter-12/recipe-02/cxx-example/build-2021-12-12-13-19-40" --config Debug --target docs
 cmake --build "/home/mightybuilder/cmake-cookbook/chapter-12/recipe-02/cxx-example/build-2021-12-12-13-19-40" --config Debug --target docsScanning dependencies of target docs
[100%] Building HTML documentation with Sphinx
CMakeFiles/docs.dir/build.make:57: recipe for target 'CMakeFiles/docs' failed
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/docs.dir/all' failed
CMakeFiles/Makefile2:79: recipe for target 'CMakeFiles/docs.dir/rule' failed
Makefile:118: recipe for target 'docs' failed
Traceback (most recent call last):
  File "/home/mightybuilder/.local/share/virtualenvs/cmake-cookbook-3GSOBQuY/bin/sphinx-build", line 5, in <module>
    from sphinx.cmd.build import main
  File "/home/mightybuilder/.local/share/virtualenvs/cmake-cookbook-3GSOBQuY/lib/python3.6/site-packages/sphinx/cmd/build.py", line 25, in <module>
    from sphinx.application import Sphinx
  File "/home/mightybuilder/.local/share/virtualenvs/cmake-cookbook-3GSOBQuY/lib/python3.6/site-packages/sphinx/application.py", line 48, in <module>
    from sphinx.util.tags import Tags
  File "/home/mightybuilder/.local/share/virtualenvs/cmake-cookbook-3GSOBQuY/lib/python3.6/site-packages/sphinx/util/tags.py", line 11, in <module>
    from jinja2 import nodes
  File "/home/mightybuilder/.local/share/virtualenvs/cmake-cookbook-3GSOBQuY/lib/python3.6/site-packages/jinja2/__init__.py", line 33, in <module>
    from jinja2.environment import Environment, Template
  File "/home/mightybuilder/.local/share/virtualenvs/cmake-cookbook-3GSOBQuY/lib/python3.6/site-packages/jinja2/environment.py", line 15, in <module>
    from jinja2 import nodes
  File "/home/mightybuilder/.local/share/virtualenvs/cmake-cookbook-3GSOBQuY/lib/python3.6/site-packages/jinja2/nodes.py", line 19, in <module>
    from jinja2.utils import Markup
  File "/home/mightybuilder/.local/share/virtualenvs/cmake-cookbook-3GSOBQuY/lib/python3.6/site-packages/jinja2/utils.py", line 647, in <module>
    from markupsafe import Markup, escape, soft_unicode
ModuleNotFoundError: No module named 'markupsafe'
make[3]: *** [CMakeFiles/docs] Error 1
make[2]: *** [CMakeFiles/docs.dir/all] Error 2
make[1]: *** [CMakeFiles/docs.dir/rule] Error 2
make: *** [docs] Error 2

@zzzlxhhh
Copy link

I tried the following command
pipenv install pip=9.0.1
But it still dont work well

mightybuilder@3d3cd3c1ba5c:~/cmake-cookbook$ pipenv install pip=9.0.1
Installing pip=9.0.1...
⠋WARNING: Invalid requirement, parse error at "'=9.0.1'"
ABORTING INSTALL... You will have to reinstall any packages that failed to install.
You may have to manually run pipenv lock when you are finished.

And after this, I tried
pipenv install setuptools==45.2.0
it seems like failed to update Pipefile and Pipefile.lock

mightybuilder@3d3cd3c1ba5c:~/cmake-cookbook$ pipenv install setuptools==45.2.0
Installing setuptools==45.2.0...
Looking in indexes: https://pypi.python.org/simple
Collecting setuptools==45.2.0
  Using cached setuptools-45.2.0-py3-none-any.whl (584 kB)
Installing collected packages: setuptools
  Attempting uninstall: setuptools
    Found existing installation: setuptools 59.6.0
    Uninstalling setuptools-59.6.0:
      Successfully uninstalled setuptools-59.6.0
Successfully installed setuptools-45.2.0

Adding setuptools==45.2.0 to Pipfile's [packages]...
Pipfile.lock (096ebe) out of date, updating to (08b894)...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
/conda/lib/python3.6/site-packages/pipenv/vendor/requirementslib/__init__.py", line 6, in <module>
    from .models import Requirement, Lockfile, Pipfile
  File "/opt/conda/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/__init__.py", line 8, in <module>
    from .requirements import Requirement
  File "/opt/conda/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 14, in <module>
    from .markers import PipenvMarkers
  File "/opt/conda/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/markers.py", line 6, in <module>
    from .utils import validate_markers, filter_none
  File "/opt/conda/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/utils.py", line 7, in <module>
    from .._compat import Link
  File "/opt/conda/lib/python3.6/site-packages/pipenv/vendor/requirementslib/_compat.py", line 44, in <module>
    is_file_url = do_import("download", "is_file_url")
  File "/opt/conda/lib/python3.6/site-packages/pipenv/vendor/requirementslib/_compat.py", line 35, in do_import
    _tmp = importlib.import_module(pip9)
  File "/home/mightybuilder/.local/share/virtualenvs/cmake-cookbook-3GSOBQuY/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named 'pip.download'

Any other solutions provided? It would be highly appreciated!

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

4 participants