我刚刚开始尝试新的pycharm社区版。我在USB记忆棒上有一个开发环境,其中包括便携式python(http://portablepython.com)。我想配置编辑器使用它。我在:
安装了便携式pythonF:/ppython27/Python-Portable.exe
当我尝试配置它时,IDE似乎无法识别Python-Portable.exe,并且Python解释器窗口中的条目显示为:
Unknown at F:/ppython27/Python-Portable.exe
我该如何解决这个问题?
答案 0 :(得分:1)
我不知道这是否已经解决,但这是一个错误的exe寻找。您需要像在python的正常安装中那样找到“python.exe”可执行文件。有了Pycharm,我怀疑它将与Portable Python 100%兼容。但是一旦你这样做,它应该主要起作用。
答案 1 :(得分:1)
检查" portable python"通过Perica Zivkovic,似乎有pycharm包装。
查看其补丁和配置文件----
modules.bat
:: Patch PyCharm
call COMMON :LogMessage "Patch PyCharm"
del %UNPACK_FOLDER%\PyCharm\App\PyCharm\bin\idea.properties /Q
tools\uniextract16\UniExtract.exe "patches\PyCharm.3.1.x.PPpatch" "%UNPACK_FOLDER%\PyCharm\App\PyCharm" >NUL
:: Replace @PY_VERSION@ in jdk.table.xml.tmp to %PY_VERSION% jdk.table.xml
setlocal ENABLEDELAYEDEXPANSION
set filein="%UNPACK_FOLDER%\PyCharm\App\PyCharm\.PyCharm30\config\options\jdk.table.xml.tmp"
set fileout="%UNPACK_FOLDER%\PyCharm\App\PyCharm\.PyCharm30\config\options\jdk.table.xml"
set old=@PY_VERSION@
set new=%PY_VERSION%
for /f "tokens=* delims=? %%i in ( '"type %filein%"') do (
set str=%%i
set str=!str:%old%=%new%!
echo !str! >> %fileout%
)
del %filein%
jdk.table.xml(压缩到 PyCharm.3.1.x.PPpatch )
<?xml version="1.0" encoding="UTF-8"?>
<application>
<component name="ProjectJdkTable">
<jdk version="2">
<name value="Portable Python 2.7" />
<type value="Python SDK" />
<version value="Python 2.7" />
<homePath value="$APPLICATION_HOME_DIR$/../pythonw.exe" />
<roots>
<classPath>
<root type="composite">
<root type="simple" url="file://$APPLICATION_HOME_DIR$/.." />
<root type="simple" url="file://$APPLICATION_HOME_DIR$/../DLLs" />
<root type="simple" url="file://$APPLICATION_HOME_DIR$/../Lib" />
<root type="simple" url="file://$APPLICATION_HOME_DIR$/../Lib/lib-tk" />
<root type="simple" url="file://$APPLICATION_HOME_DIR$/../Lib/site-packages" />
<root type="simple" url="file://$APPLICATION_HOME_DIR$/../Lib/site-packages/PIL" />
<root type="simple" url="file://$APPLICATION_HOME_DIR$/../Lib/site-packages/gtk-2.0" />
<root type="simple" url="file://$APPLICATION_HOME_DIR$/../Lib/site-packages/win32" />
<root type="simple" url="file://$APPLICATION_HOME_DIR$/../Lib/site-packages/win32/lib" />
<root type="simple" url="file://$APPLICATION_HOME_DIR$/../Lib/site-packages/pythonwin" />
<root type="simple" url="file://$APPLICATION_HOME_DIR$/../Lib/site-packages/wx-2.9.4-msw" />
<root type="simple" url="file://$APPLICATION_HOME_DIR$/helpers/pycharm" />
<root type="simple" url="file://$APPLICATION_HOME_DIR$/helpers/python-skeletons" />
<root type="simple" url="file://$APPLICATION_HOME_DIR$/.PyCharm30/system/python_stubs/580531057" />
</root>
</classPath>
<sourcePath>
<root type="composite" />
</sourcePath>
</roots>
<additional>
<PATHS_ADDED_BY_USER_ROOT PATH_ADDED_BY_USER="file://$APPLICATION_HOME_DIR$/helpers/pycharm" />
</additional>
</jdk>
</component>
</application>