question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug(clean): pipenv clean delete Python Markdown extensions

See original GitHub issue

1. Summary

pipenv clean delete my Python Markdown extensions, that I install from GitHub.

2. Environment

  • Windows 10 Enterprise LTSB 64-bit EN,
  • Python 3.6.4,
  • Pipenv 10.1.2,
  • Pelican 3.7.1,
  • Python Markdown 2.6.11,
  • my repository on GitHub.

3. Files

I add my Python Markdown extensions to pelicanconf.py (see MARKDOWN subsection on official Pelican site), example:

MARKDOWN = {
    'extension_configs': {
        'downheader': {},
    },
    'output_format': 'html5',
}

4. Stepse to reproduce

I try build my site:

D:\Kristinita>pipenv run pelican -s publishconf.py
ERROR: Could not process Gingerinas\Korvers.md
  | ModuleNotFoundError: No module named 'mdx_downheader'
ERROR: Could not process Gingerinas\Testus.md
  | ModuleNotFoundError: No module named 'mdx_downheader'
# Another articles …
ERROR: Could not process Sublime-Text\Sublime-Text-Power-User-notes.md
  | ModuleNotFoundError: No module named 'mdx_downheader'
ERROR: Could not process Sublime-Text\ValeriyaSpeller.md
  | ModuleNotFoundError: No module named 'mdx_downheader'
Done: Processed 0 articles, 0 drafts, 0 pages and 0 hidden pages in 2.03 seconds.

I get errors. I need to install mdx_downheader extension.

D:\Kristinita>pipenv install git+https://github.com/cprieto/mdx_downheader.git#egg=mdx_downheader --dev
Installing git+https://github.com/cprieto/mdx_downheader.git#egg=mdx_downheader…
Warning: You installed a VCS dependency in non–editable mode. This will work fine, but sub-dependencies will not be resolved by $ pipenv lock.
  To enable this sub–dependency functionality, specify that this dependency is editable.
Collecting mdx_downheader from git+https://github.com/cprieto/mdx_downheader.git#egg=mdx_downheader
  Cloning https://github.com/cprieto/mdx_downheader.git to c:\users\sashac~1\appdata\local\temp\pip-build-tgmzt091\mdx-downheader
Requirement already satisfied: Markdown in d:\kristinita\.venv\lib\site-packages (from markdown-downheader)
Installing collected packages: markdown-downheader
  Running setup.py install for markdown-downheader: started
    Running setup.py install for markdown-downheader: finished with status 'done'
Successfully installed markdown-downheader-1.0.1

Adding git+https://github.com/cprieto/mdx_downheader.git#egg=mdx_downheader to Pipfile's [dev-packages]…
Pipfile.lock (46f8f0) out of date, updating to (2e4879)…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (2e4879)!
Installing dependencies from Pipfile.lock (2e4879)…
  ================================ 37/37 - 00:00:23
To activate this project's virtualenv, run the following:
 $ pipenv shell

Now I can successful build my Pelican site:

D:\Kristinita>pipenv run pelican -s publishconf.py
Done: Processed 26 articles, 0 drafts, 0 pages and 0 hidden pages in 6.94 seconds.

But pipenv clean delete mdx_downheader:

D:\Kristinita>pipenv clean --verbose
Ignoring 'six'.
Ignoring 'packaging'.
Unintalling 'markdown-downheader'…
Unintalling 'mdx-customspanclass'…

I can’t build my site again.

D:\Kristinita>pipenv run pelican -s publishconf.py
ERROR: Could not process Gingerinas\Korvers.md
  | ModuleNotFoundError: No module named 'mdx_downheader'
ERROR: Could not process Gingerinas\Testus.md
  | ModuleNotFoundError: No module named 'mdx_downheader'
# Another articles …
ERROR: Could not process Sublime-Text\Sublime-Text-Power-User-notes.md
  | ModuleNotFoundError: No module named 'mdx_downheader'
ERROR: Could not process Sublime-Text\ValeriyaSpeller.md
  | ModuleNotFoundError: No module named 'mdx_downheader'
Done: Processed 0 articles, 0 drafts, 0 pages and 0 hidden pages in 2.92 seconds.

Thanks.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
kennethreitzcommented, Mar 2, 2018

oh i see what’s happening here — you need to provide your git installs as editable in order for us to know about their dependencies.

1reaction
kennethreitzcommented, Mar 2, 2018

Don’t run clean.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can I remove pipenv cache folder? How to safely do it
While simply deleting the Cache subfolder works fine, using pipenv lock --clear deletes the cache for your current project only.
Read more >
Pipenv: CHANGELOG.rst | Fossies
Updated setup.py to remove support for python 3.6 from built pipenv packages' Metadata. ... Fixed a bug with package discovery when running pipenv...
Read more >
python delete variables clean memory Code Example - Grepper
a = 10 print a del a print a ## throws an error here because it's been deleted already.
Read more >
PieCrust · PyPI
PieCrust is a static website generator and lightweight CMS that's all managed with text files. No complex setup, databases, or administrative panels.
Read more >
PyScaffold Documentation - Read the Docs
PyScaffold relies on a Python package manager for its installation. ... If you want to install PyScaffold with all official extensions, run:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found