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

Install on MacOS Sonoma - ModuleNotFoundError: No module named 'markdown' #686

Closed
the4cesof opened this issue Jun 20, 2024 · 3 comments
Closed
Labels

Comments

@the4cesof
Copy link

Following the process at https://florianfesti.github.io/boxes/html/install/macos.html everything was successful until I tried to run ./scripts/boxesserver

First, I had to change it to ./boxes/scripts/boxesserver

  • But then I get an error:
    Traceback (most recent call last):
    File "/Users/4ces/boxes/./scripts/boxesserver", line 34, in
    import markdown
    ModuleNotFoundError: No module named 'markdown'

  • checked the steps. The first time when I ran pip3 install Markdown affine shapely
    the output was "Successfully installed Markdown-3.6 affine-2.4.0 numpy-2.0.0 shapely-2.0.4"

I ran it again just in case. this time it gives an error:
"error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try brew install
xyz, where xyz is the package you are trying to
install."

So I tried brew install Markdown but this did not change my error.

when I run python3 -c "help('modules')" markdown is not in the list. Wondering if I have more than one python install here... sorry I'm not sure if this is a bug or something wrong with my specific installation.

the full text of my efforts are attached:
terminal output.txt.txt

@the4cesof the4cesof added the bug label Jun 20, 2024
@marauder37
Copy link

marauder37 commented Jun 30, 2024

You do have more than one Python install. You have system Python 3.12 and Homebrew Python 3.12.

The instructions you followed will not work for Python 3.12. [1]

Try this:

cd /Users/U3er/boxes
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
./scripts/boxesserver

This is the brief version of the instructions that pip3 spat out at the end of your terminal log.

To see which installed Python is actually in use, run which python3.

If it says: /Library/Frameworks/Python.framework/Versions/3.12/bin/python3 it is the macOS system python
If it says: /opt/homebrew/bin/python3 it is the Homebrew python
If it says: /Users/U3er/boxes/venv/bin/python3 it is the virtualenv that you set up using the instructions above

[1] https://docs.brew.sh/Homebrew-and-Python#pep-668-python312-and-virtual-environments

@florianfesti
Copy link
Owner

Did that help? Is the command block above something that should go into the MacOS install instructions?

@florianfesti
Copy link
Owner

Closing due to lack of activity. Feel free to re-open or just continue the discussion if the issue is still not resolved.

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

No branches or pull requests

3 participants