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.

"figures" not installing via pip, not called from doc example correctly

See original GitHub issue

Please note

If you are reporting an installation or module import issue, please note that this project only accepts reports about problems with packages downloaded from the Python Package Index. Conda users should take issues to one of the following trackers:

Expected behavior and actual behavior.

Be able to run an example from the documentation. Instead receive “ImportError: No module named ‘figures’”

Steps to reproduce the problem.

Install shapely via pip: $ pip install shapely Collecting shapely Downloading Shapely-1.6.1-cp35-cp35m-macosx_10_6_intel.whl (2.6MB) 100% |████████████████████████████████| 2.6MB 260kB/s Installing collected packages: shapely Successfully installed shapely-1.6.1

Download example ‘Source code’ file from documentation (re. intersection & union at https://shapely.readthedocs.io/en/latest/manual.html): $ curl -O https://shapely.readthedocs.io/en/latest/code/intersection-sym-difference.py

Try to run it $ python intersection-sym-difference.py Traceback (most recent call last): File “intersection-sym-difference.py”, line 5, in <module> from figures import SIZE, BLUE, GRAY, set_limits ImportError: No module named ‘figures’

Try to find figures $ locate shapely (get lots of files listed) $ locate shapely | grep figures (nothing)

To fix: Download figures.py manually. Install in shapely directory. Change call in documentation example source code from

from figures import SIZE, BLUE, GRAY, set_limits to from shapely.figures import SIZE, BLUE, GRAY, set_limits

Operating system

Mac OS X 10.12.6

Shapely version and provenance

1.6.1 from PyPI using pip

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:11
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
sgilliescommented, Feb 16, 2022

The solution here is to cd to docs/code and run the examples from there. The doc examples are going to get a rework for 2.0 and the figures module will go away.

2reactions
drscotthawleycommented, Oct 28, 2017

Obviously do what you like with your own code, however I think that would be an unfortunate choice for some users, as I only found out about Shapely because I was searching on how to draw intersection & union of my sets.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"figures" not installing via pip, not called from doc example ...
yeal, it solves my problem, so in short, just copy the figures.py file to the shapely install directory. For my case, the shapely...
Read more >
python - pip install . creates only the dist-info not the package
Run pip uninstall -y pkgname && pip install -v . and check the build log whether the source files are processed (look for...
Read more >
Package installation issues | PyCharm Documentation
The package cannot be installed because the package is not available in the repository that is supported by the selected package manager.
Read more >
Using Python's pip to Manage Your Projects' Dependencies
In this example, you run pip with the install command followed by the name of the package that you want to install. The...
Read more >
A Practical Guide to Using Setup.py - GoDataDriven
An example of where the package name and the directory do not match is Scikit-Learn: you install it using pip install scikit-learn ,...
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