简体   繁体   English

如何在pycharm中为跨平台项目设置python解释器?

[英]How do I setup the python interpreter in pycharm for a cross-platform project?

I have a cross-platform python project (it's a whole bunch of scripts) that I run (and develop) on Windows as well as Linux (Redhat and Ubuntu). 我有一个跨平台的python项目(一堆脚本),我在Windows和Linux(Redhat和Ubuntu)上运行(并开发)。 Everything works fine except the fact that I have to go and "Configure Python Interpreter" everytime I open the project in a different operating system. 一切正常,除了每次我在不同的操作系统中打开项目时都必须去“配置Python解释器”这一事实。

My python executable locations for the Windows and Linux systems are something like: For windows: c:/Anaconda/python.exe For linux: /home/username/anaconda/python 我在Windows和Linux系统上的python可执行文件位置类似于:对于Windows:c:/Anaconda/python.exe对于Linux:/ home / username / anaconda / python

Is there a way that I can make Pycharm point to the right Python Interpreter based on the Operating system that is opened in ? 有没有一种方法可以根据在中打开的操作系统使Pycharm指向正确的Python解释器?

实际上,我对此很感兴趣 ……有人已经在这里回答了这个问题: 在多个操作系统(不同的解释器路径)之间共享一个PyCharm项目。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 execv 运行时指定 Python 解释器的跨平台方式 - Cross-platform way to specify Python interpreter when running with execv 如何以跨平台方式在Python中打开带有主题的默认邮件程序? - How do I open the default mail program with a subject in Python in a cross-platform way? 是否有用于图形化跨平台Python应用程序的框架项目? - Is there a skeleton project for a graphical cross-platform Python application? 跨平台Python可执行文件 - Cross-platform Python Executables 如何使用 PyCharm 插件在 IntelliJ IDEA 中配置 Python 解释器? - How do I configure a Python interpreter in IntelliJ IDEA with the PyCharm plugin? 如何以编程方式发现 git 使用的跨平台编辑器? - How do I programmatically discover the editor git uses, cross-platform? 如何为python软件包开发实现跨平台的持续集成? - How to implement cross-platform continuous integration for python package development? 如何使用Python制作一个简单的跨平台webbrowser? - How to make a simple cross-platform webbrowser with Python? 如何在Python中使用装饰器跨平台/浏览器运行测试? - How to run tests cross-platform/browser using decorator in Python? 如何在跨平台上使用pycharm venv(在Linux-Windows等。)? - How to use pycharm venv at cross-platform (at linux - windows etc..)?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM