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

using PyPlot not working #184

Closed
TimEvans opened this issue Dec 10, 2015 · 1 comment
Closed

using PyPlot not working #184

TimEvans opened this issue Dec 10, 2015 · 1 comment

Comments

@TimEvans
Copy link

When I try to call using PyPlot I get an error when it tries to install matplotlib. I tried to clean things up and remove my local version of Anaconda thinking that might be the problem and reinstall PyPlot and PyCall fresh but still getting the error. I am confused also by the error INFO: No system-wide Python was found; got the following error: as I am on Linux Mint, and certainly have a system wide python installed. Could this be part of the reason? Here is my output

julia> ENV["PYTHON"]=""
""

julia> Pkg.update()
INFO: Updating METADATA...
INFO: Updating XGBoost...
INFO: Computing changes...
INFO: No packages to install, update or remove

julia> Pkg.add("PyPlot")
INFO: Installing Conda v0.1.8
INFO: Installing JSON v0.5.0
INFO: Installing LaTeXStrings v0.1.6
INFO: Installing PyCall v1.2.0
INFO: Installing PyPlot v2.1.1
INFO: Building PyCall
INFO: No system-wide Python was found; got the following error:
could not spawn `'' -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('VERSION'))"`: no such file or directory (ENOENT)
using the Python distribution in the Conda package
Fetching package metadata: ....
Solving package specifications: ...................
# All requested packages already installed.
# packages in environment at /home/tim/.julia/v0.4/Conda/deps/usr:
#
numpy                     1.10.1                   py27_0    http://repo.continuum.io/pkgs/free/linux-64/numpy-1.10.1-py27_0.tar.bz2
INFO: PyCall is using /home/tim/.julia/v0.4/Conda/deps/usr/bin/python (Python 2.7.11) at /home/tim/.julia/v0.4/Conda/deps/usr/bin/python, libpython = /home/tim/.julia/v0.4/Conda/deps/usr/lib/libpython2.7.so
INFO: Package database updated

julia> using PyPlot
INFO: Recompiling stale cache file /home/tim/.julia/lib/v0.4/PyPlot.ji for module PyPlot.
INFO: Recompiling stale cache file /home/tim/.julia/lib/v0.4/PyCall.ji for module PyCall.
INFO: Installing matplotlib via the Conda package...
Fetching package metadata: ....
Solving package specifications: ......................
# All requested packages already installed.
# packages in environment at /home/tim/.julia/v0.4/Conda/deps/usr:
#
matplotlib                1.5.0               np110py27_0    defaults
ERROR: InitError: PyError (:PyImport_ImportModule) <type 'exceptions.ImportError'>
ImportError('cannot import name scimath',)
  File "/home/tim/.julia/v0.4/Conda/deps/usr/lib/python2.7/site-packages/matplotlib/__init__.py", line 122, in <module>
    from matplotlib.cbook import is_string_like, mplDeprecation, dedent, get_label
  File "/home/tim/.julia/v0.4/Conda/deps/usr/lib/python2.7/site-packages/matplotlib/cbook.py", line 32, in <module>
    import numpy as np
  File "/home/tim/.julia/v0.4/Conda/deps/usr/lib/python2.7/site-packages/numpy/__init__.py", line 180, in <module>
    from . import add_newdocs
  File "/home/tim/.julia/v0.4/Conda/deps/usr/lib/python2.7/site-packages/numpy/add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
  File "/home/tim/.julia/v0.4/Conda/deps/usr/lib/python2.7/site-packages/numpy/lib/__init__.py", line 17, in <module>
    from . import scimath as emath

 [inlined code] from /home/tim/.julia/v0.4/PyCall/src/exception.jl:81
 in pyimport at /home/tim/.julia/v0.4/PyCall/src/PyCall.jl:302
 in __init__ at /home/tim/.julia/v0.4/PyPlot/src/PyPlot.jl:227
 in _require_from_serialized at loading.jl:84
 in _require_from_serialized at ./loading.jl:109
 in require at ./loading.jl:219
during initialization of module PyPlot

julia> 

Thanks

@stevengj
Copy link
Member

Probably a duplicate of JuliaPy/PyCall.jl#65 ... see that issue for workarounds.

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

No branches or pull requests

2 participants