FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[Doc]: windows install instructions do not work · Issue #24779 · matplotlib/matplotlib · GitHub

Repository navigation

[Doc]: windows install instructions do not work #24779

Closed

Description

Documentation Link

https://matplotlib.org/devdocs/devel/development_setup.html#create-a-dedicated-environment

Problem

The conda instructions do not work on windows:

  • it is very slow
  • fails on lxml + pikepdf installation

The venv method does not include in information about how to install all of the dev dependencies

Suggested improvement

Possible options for conda:

  • find a way to get pikepdf to install on windows
  • remove those entries from environment.yml

Possible solution for venv:

  • document pip install -r requirements/dev/dev-requirements.txt

Activity

  1. added this to the v3.7.0 milestone on Dec 19, 2022
  2. tacaswell commented on Dec 19, 2022

    MemberAuthor

    These were issues I observed people having at the pydata global sprints, 🐑 it took me this long to write them up.

  3. timhoffm commented on Dec 19, 2022

    Member

    fails on lxml + pikepdf installation

    Is that pikepdf/pikepdf#410? I haven't tested, but it seems there are wheels available since a couple of days. - Some problems solve themselves if you wait long enough 😄

    Other environment.yml updates: #24780.

    We may consider having an infrequent CI run that builds based on environment.yml to make sure it's still working.

  4. tacaswell commented on Dec 19, 2022

    MemberAuthor

    I do not remember what version of Python they reported using....

  5. oscargus commented on Dec 22, 2022

    Member

    There are wheels on pypi but not on conda/conda-forge.

  6. dstansby commented on Dec 22, 2022

    Member

    I don't have a windows box to try, but perhaps using mamba instead of conda would speed things up?

  7. oscargus commented on Dec 22, 2022

    Member

    Thinking twice, pikepdf is installed from pip, so it was probably just that there were no Windows wheels available at that time. (Still, there are no Windows packages on conda, but there are Linux packages, so one can think of installing from pip on Windows and conda otherwise/on LInux.)

    mamba is mentioned it seems.

  8. oscargus commented on Dec 22, 2022

    Member

    I just followed the instructions and it worked well. (Windows 11) Edit: I should mention that I have some things already installed via pip, but pikepdf and lxml were downloaded and installed, as I did not run Python 3.11 earlier as default.)

    However, something pulls in matplotlib-base as a dependency (I think via matplotlib-inline which I think comes from ipython), which is maybe not a big deal but would be nice to avoid if possible.

    Also, when installing, pip pulls in another version of numpy, certifi, pybind11, setuptools_scm, and packaging. This may be OK, but I think that these are actually installed "properly", not just as part of the build, so maybe they should be in environment as well? (numpy should of course be numpy_lowest_supported_version or whatever the name is.)

  9. tacaswell commented on Dec 22, 2022

    MemberAuthor

    Also, when installing, pip pulls in another version of numpy, certifi, pybind11, setuptools_scm, and packaging.

    That maybe the isolated build environment doing it's job. I'm torn if we should add --no-build-isolation to our install instructions.

  10. ianthomas23 commented on Dec 22, 2022

    Member

    I am arriving late to this, so I may not have the full picture.

    There is no need for pybind11 to be in the environment.yml. With build isolation, which is what happens unless you explicitly disable it, pybind11 and friends are installed in the temporary isolated build environment to build the matplotlib wheel and that build environment is then discarded. It never needs to be in the conda environment.

    I have just tried the latest environment.yml without pybind11 under Windows 10 and it works fine. Tediously slow but works. Use of mamba should indeed speed this up.

  11. oscargus commented on Dec 22, 2022

    Member

    That's what I thought would happen, but after building I can import pybind11 and setuptools_scm. But maybe I am missing something?

  12. oscargus commented on Dec 27, 2022

    Member

    Another thing here is that maybe one would like to point out a bit clearer how to get the Windows build dependencies. It is in the next section, but can be a bit confusing, I guess, if one follows it step by step. (On Linux and, I assume, Mac there is usually some sort of compiler installed.) Taking that if one needs help to install a compiler, it is probably the easiest to install the Visual Studio build environment (or whatever it is called), one may think of directly linking to the download page for that.

  13. hasanrashid commented on Jan 4, 2023

    Contributor

    Not sure if anyone is working on this, if not, I will take a look

  14. melissawm commented on Jan 4, 2023

    Member

    @hasanrashid that would be great, feel free to ping if you need any assistance! 😄

  15. modified the milestones: v3.7.0, v3.8.0 on Jan 12, 2023
  16. ashusnapx commented on Feb 11, 2023

    If you're having trouble setting up Matplotlib for development on Windows, there are a few steps you can try to troubleshoot the issue:

    Make sure you have the correct dependencies installed: Before installing Matplotlib, make sure you have the necessary dependencies, such as Python, NumPy, and a supported version of the Microsoft Visual C++ Redistributable for Visual Studio.

    Use a virtual environment: It's recommended to install Matplotlib in a virtual environment to avoid conflicts with other Python packages on your system.

    Check the file paths: Ensure that the file paths in the activation script match the actual file paths on your system. For example, if your virtual environment is located in a different folder than the one specified in the activation script, replace the file path in the script with the correct path to your virtual environment.

    Try using a different terminal: If the activation script is not working in the Command Prompt, try using a different terminal, such as the Windows PowerShell, and run the appropriate activation script for that terminal.

    Run the activation script as an administrator: If you're still having trouble activating the virtual environment, try right-clicking on the activation script and selecting "Run as administrator".

  17. sohamds1 commented on Feb 21, 2023

    Can you provide me a good resource to follow for making a virtual environment in python?

  18. hasanrashid commented on Feb 22, 2023

    Contributor

    @ashusnapx Thank you for the pointer. Here is where I am with this:

    • I have used conda to build matplotlib with both python 3.11, 3.10 and 3.9.
    • All of them succeeded, but python 3.9 took about 35 minutes to build- other 2 were faster
    • I used virtualenv, and it succeeded as well, and appeared faster than conda

    So, what would be the best way to solve this? remove pikepdf from environment.yml, or update documentation with this caveat + the venv instruction of using pip?

  19. hasanrashid commented on Mar 17, 2023

    Contributor

    @ashusnapx @melissawm Wanted to see if this still needed help. For me pikepdf never failed. I listed the behaviour I saw above. Do we still go ahead with removing the entries from the environment yml?

  20. nitin-pandita commented on Apr 2, 2023

    Can I have my hands on this issue, I am new to open source and wanted to contribute

  21. tacaswell commented on Apr 2, 2023

    MemberAuthor

    So far we have 2 reports (@hasanrashid and @oscargus ) that things work as expected and hence no action is needed.

    @nitin-pandita I think the work we need here is (assuming you have a windows machine) is to verify that the instructions work for you and if they do we can close this issue!

  22. nitin-pandita commented on Apr 2, 2023

    No problem @tacaswell , Please let me know if there is some other good first issue I can contribute to, as I mentioned early I'm new to Open source, and I would love to work under your guidance and support. Thank you @tacaswell

  23. nitin-pandita commented on Apr 2, 2023

    So far we have 2 reports (@hasanrashid and @oscargus ) that things work as expected and hence no action is needed.

    @nitin-pandita I think the work we need here is (assuming you have a windows machine) is to verify that the instructions work for you and if they do we can close this issue!

    Can you please suggest to me some good first issues as a beginner? I really wanted to get indulge in community work, I'm more into web Scrapping and Machine Learning

  24. rcomer commented on Apr 2, 2023

    Member
  25. turnipseason commented on May 2, 2023

    Contributor

    Hi, @tacaswell! I followed the windows instructions for both venv and conda (python 3.11.3) and there were no problems with either. Conda did take a bit longer though (~25 minutes as opposed to ~15 with venv).
    @nitin-pandita didn't seem to respond so I wondered if this issue should be considered closed.

  26. QuLogic commented on May 2, 2023

    Member

    That makes 3 successes, so I think we can close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Documentation🌱 Good first issueOpen a pull request against these issues if there are no active ones!

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL