svgwrite
svgwrite copied to clipboard
svgwrite for macos monterey gives constantly this error ModuleNotFoundError: No module named 'svgwrite'
I have tried many ways: changing from older Python version 2.x to 3.8.9, installing macports and py-svgwrite, and many other ways I found searching the internet.
Before svgwrite functioned really well in my older mac and I just love it. How could I solve this problem?
I'm having the same problem, but installing with conda install (anaconda set up). svgwrite-1.4.3 installed from conda forge on a M1 Mac with Monterey. Like you, svgwrite was working well on an older Mac, in my case on Mojave.
% cat test2.py
#!/Users/xx/opt/anaconda3/bin/python
import svgwrite
def main():
print("main() here")
if __name__ == '__main__':
main()
% ./test2.py
Traceback (most recent call last):
File "/Users/xx/Developer/Python/Constellations/New22/./test2.py", line 3, in <module>
import svgwrite
ModuleNotFoundError: No module named 'svgwrite'
For what it's worth, I've had no problems using svgwrite installed from conda-forge (https://anaconda.org/conda-forge/svgwrite) on a current macbook pro (Ventura) or a somewhat older M1 mac mini on I think Monterey.
(My default guess which seeing ModuleNotFoundError
is that the package was installed on a different version of python, which can happen by having the wrong pip/conda in path; or maybe in the wrong env. It's at least probably not an error that is related to svgwrite per se, but something about its installation or packaging.)