sublime text2 import error: no module named gnuplot

  • Last Update :
  • Techknowledgy :

I'm trying to use Gnuplot in a Python script I'm writing in Sublime Text. Whenever I build, I get the error message

Traceback (most recent call last):
File "..." line 4, in <module>
   import Gnuplot
   ImportError: No module named Gnuplot

The import error seems to be common, just with other modules. Usually the fix is related to PYTHONPATH. However, Gnuplot is on my computer located in

/Library/Frameworks / Python.framework / Versions / 2.7 / lib / python2 .7 / site - packages

Suggestion : 2

Click URL instructions: Right-click on the ad, choose "Copy Link", then paste here → (This may not be possible with some types of ads)

As a newbie I 've just installed "gnuplot.py" after installing Numeric 
Python on my Mandrake Linux system.However, when I
try to run "python 
demo.py ", I get an Import Error message: "
No module named Gnuplot "

The complete output is shown below.

I don 't know what the problem is or how to fix it.

Thanks
for your help!

   **
   ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** *

   [tom @localhost~] $ dir

Desktop LearnPython.rpmPkgs Welcome.desktop

firefox - installer numarray - 1.3 .3
smoothwheel - 0.44 .7 .20050605 - fx + mz + ns + nv + tb.xpi XmaximaTut2004 - 1. tex

gnuplot - py - 1.7 Numeric - 24.0 b2 thunderbird XmaximaWork2004.tex

install_flash_player_7_linux Python tmp

   [tom @localhost~] $ cd gnuplot - py - 1.7

[tom @localhost gnuplot - py - 1.7] $ python demo.py

Traceback(most recent call last):

   File "demo.py", line 22, in ?

   import Gnuplot, Gnuplot.funcutils

ImportError: No module named Gnuplot

[tom @localhost gnuplot - py - 1.7] $

Suggestion : 3

It appears that you followed the instructions for installing on Sublime Text 2. For now on Sublime Text 3 you must install using git. The instructions from the site follows:,As of late May, 2021, Sublime Text 4 has been released. As a result, the old solution to installing Sublime Text 3 via Homebrew will now install Sublime Text 4 instead. If this is what you actually want, then the following brew installation command will install it:,The answer to my question is that I am using regular expression in Sublime text 3 editor. Therefore, the answer is to put in the find (ctr+F),Sublime text 3 is just an editor so it doesn't have advanced features right out of the box like Visual Studio. You need to set up your own local host in your current working directory. There are many ways to achieve this. You can set up a simple static Python server, if you have Python installed in your machine, with python -m SimpleHTTPServer in your terminal console (or command prompt in windows). You should see this message

{
   "cmd": ["fpc", "${file_path}/${file_base_name}"],
   "selector": "source.pascal",
   "variants": [{
      "cmd": ["start", "cmd", "/c", "$file_base_name.exe & pause"],
      "name": "Run",
      "shell": true
   }]
}
 Serving HTTP on 0.0 .0 .0 port 8000...
{
   "cmd": ["c:/Python32/python.exe", "-u", "$file"],
   "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
   "selector": "source.python"
}
...
"xdebug": {
   "url": "http://example1/",
   "port": 9500
}
...
Find: (\d + \.\d * )
Replace with: \$$1\ $(after pressing on the regler expression key in sublime text 3)
~/Library/Application
Support / Sublime Text 3 / Local / Session.sublime_session

Suggestion : 4

如果直接在Terminal中执行完全相同的代码行,则导入和使用Gnuplot不会出现问题。

我试图在用Sublime Text编写的Python脚本中使用Gnuplot。每当我构建时,我都会收到错误消息

Traceback (most recent call last):
File "..." line 4, in <module>
   import Gnuplot
   ImportError: No module named Gnuplot

导入错误似乎很常见,仅与其他模块一样。通常,此修复程序与PYTHONPATH有关。但是,Gnuplot在我位于

/Library/Frameworks / Python.framework / Versions / 2.7 / lib / python2 .7 / site - packages