Python Forum
Looking for a "custom" script editor
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Looking for a "custom" script editor
#11
This is what I meant by clunky Undecided
PyCharm: Trying to import a module that was installed through pip
import mutagen.mp3
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "C:\Program Files\JetBrains\PyCharm 2019.1.3\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'mutagen'
Same thing (++) with VS code. I don't doubt you're right in that they can provide what I want, it just feels unnecessarily complicated to set up. Lots of steps, need to follow tutorials just to set them up, google stuff that comes up. I'm sure I could use 30 minutes to get one of these IDEs up and running, then some hours on customizing the UI's, and I know that I'm probably coming off as lazy, I just find it weird that there isn't more minimalistic out-of-the box editors that just works.


Edit: I suppose there are alternatives, the challenge is just to find them. This is basically exactly what I want: http://paulwinex.com/portfolio/multi-script-editor/.
Reply
#12
That is because pycharm is using its own embedded python interpreter instead of hte one you install things to with pip. You can modify which interpreter your project is using by going to File -> Settings -> Project <Name> -> Project Interpreter -> Project Interpreter drop down menu -> Show all -> + symbol to add your system interpreter

Or you could simply create a new project using the correct interpreter.
   

Well there are minimalistic out-of-the box editors, but with that you also lose features such as the specific one you are looking for.
Recommended Tutorials:
Reply
#13
You can try PyScripter very simple to use,just paste in code and push Run button,don't even need to save.
Quote:PyCharm: Trying to import a module that was installed through pip
Importing module/package has nothing to with editor/IDE.
Learn where pip install and sometime need to setup same version in editor/IDE.

A demo,it's all command line cmd install/test of module/package.
I use cmder here but commands is just the same in cmd.
# Show python.exe placement
E:\div_code
λ python -c "import sys; print(sys.executable)"
C:\python37\python.exe

# Show pip version and placement(will only install to this version)
E:\div_code
λ pip -V
pip 19.1.1 from c:\python37\lib\site-packages\pip (python 3.7)

# install
E:\div_code
λ pip install mutagen
Collecting mutagen
  Downloading ......
Installing collected packages: mutagen
Successfully installed mutagen-1.42.0

# Test that it work.
E:\div_code
λ python
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import mutagen
>>> mutagen.version_string
'1.42.0'

>>> from mutagen.mp3 import MP3
>>> # No errors 
>>> exit()
When all work from command line,most point to same Python interpreter in editor/IDE.
Eg for Pycharm Configure a Python interpreter.

Basic install here Python 3.6/3.7 and pip installation under Windows.
If not work exactly as i showed over here.

Has a tutorial here VS Code from start .
It has all option you want and more.
Eg also extensions like AREPL if want a live output.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Music Notation editor; how to build the editor? direction to go? philipbergwerf 1 1,650 Jan-01-2022, 04:56 PM
Last Post: Larz60+
  python script file not opening in IDLE editor srm 2 4,338 Jun-23-2019, 08:45 AM
Last Post: Larz60+
  script editor abrew132 4 4,322 Apr-20-2017, 08:34 PM
Last Post: Josh

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020