質問

I have the PythonScript plugin working in NPP. I'd like to use the python-dateutil package/module. I've tried unzipping it in C:\Program Files\Notepad++\plugins\PythonScript and .\lib but I still get:

ImportError: No module named dateutil

I don't have a stand-alone python installation.

Where should the package be installed? Do I need to run something or rename the directory to install it properly?

役に立ちましたか?

解決

The comment from @martineau is correct.

Here's what I did:

  1. Download the 1.5 package from http://labix.org/python-dateutil (1.5 because you want it compatible with Python 2.x)

  2. Copy the dateutil directory from the archive to the Notepad++ directory, plugins\PythonScript\lib - this is probably C:\Program Files\Notepad++\plugins\PythonScript\lib, or C:\Program Files (x86)\Notepad++\plugins\PythonScript\lib, but could be elsewhere. Look at where Notepad++ is installed if you're not sure.

  3. import dateutil now works, and you can use the various features.

Full disclosure: I'm the author of PythonScript

他のヒント

Plugin directory for Notepad++ is the usual. Thonny Python IDE supports the ability to install plugins from PyPi or from file to the python directory instead of trying to do it through Notepad++.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top