IntelliJ IDEA 16 when you create a virtualenv, you can call it as an SDK and automatically runs and validates language, libraries and everything that you need for that project. This is helpful since the lint and other libraries become available on the IDE.
The Problem:
I have a machine that has 2 python installations (python2 and python3).
I can set up virtual environments in those different versions but when I want to create a project SDK from a virtualenv where python 3 is being use get the message "Cannot Save Settings" "Please specify different sdk name".
The same process that I use to set up the virutalenv on python 2 is the same for python 3 but this error keeps happening.
I would appreciate any help on how to configure that. I have looked all around the web and forums that talk about intelliJ and the SDK configurations but all of them are for python 2.7 and not when you have two python version installed on the same machine and using virutalenvs so set it up.
Related
I trying to write test scripts using HttpLibrary (from robot framework) on Eclipse RED editor and below are the steps i have performed -
Steps performed
Installed robot framework HttpLibrary using below command
pip install --upgrade robotframework-httplibrary
From Settings-> Imports, added HttpLibrary to my script
* Settings *
Library HttpLibrary
'Unknown 'HttpLibrary' library. Try to use Quick Fix (Ctrl+1) or add library to red.xml for proper validation' error message is noticed on hovering the HttpLibrary line in my script.
However upon looking at Red.xml ->Referenced libraries tab, HttpLibrary is listed in the libraries block HttpLibrary in Red.xml
I am wondering if there is any different procedure to add libraries to Red.xml. I am stuck on trying different ways to add HttpLibrary to my script.
After few hours of investigation, i have found root cause of the issue.
I am using Python 3.6.4 in my machine and installed Robot Framework on it.
HttpLibrary supports only Python 2 and so though the library is listed in the Red.xml referenced libraries tab, still my Robot Framework script was not able to reference and run it properly.
Please note that not all the Robot Framework libraries are supported by Python 3.6.4
This occasionally happens. Even when the library is already present in the project config file (RED.xml) and present in the project tree panel. Using CTR+1 and opting for the quick fix option will generally correct this issue without any visual difference.
In the HttpLibrary Github documentation there the usage section also highlights that the library should be imported like:
*** Settings***
Library HttpLibrary.HTTP
This gives a different result.
So I wrote a little Command-Line App and want to provide an easy way to clone and use it. Problem: My app has some dependencies like Hashlib and Pyperclip.
Is there a best practice to get missing packages installed on a different machine?
Can I do so without people needing to install global pip packages?
It is a good idea to ship it as a venv?
Can like compile them into a single python file (somewhat like a binary)?
If I cannot do so, how to I get packages installed on a different machine?
Is there a nice routine to allow the user to completely remove my app once installed?
You could use the py2exe module to make a standalone application for the Windows platform. You can use py2app to make standalone apps on the Mac platform. For Linux, you should prepare a package using the .deb format to target the Ubuntu/Debian environment (which is one of the most popular flavors of *nix). Each other *nix flavor has its own packaging system that you would have to follow to target it as a platform.
I need to deploy my python 3 app as .exe for Windows. I'm working on linux. I have tried PyInstaller, but it seems that I have to run it from the Windows to make valid .exe. I do have access to Windows, but I would like to use it to test that my .exe is working rather than to build it.
Also is it possible to create this exe using GitLab CI?
In general, you could try to use wine in order to use windows tooling on a Linux box.
But I think this is really the wrong approach: the natural deployment option for python ... are python modules. So, instead of wasting (?) your time building one-platform-exe files ... learn how to create proper Python modules, and deploy your app using your own module.
See here for some first reading on python modules on Windows.
I have installed Python 3.4 on my windows 7 64bit system and it runs OK with eclipse. But I am trying to install kivy or pyQT and I get a message that Python 3.4 is not installed on my system. I am totally new to python and all its modules. What can I do to correct this problem? I need a GUI but I think that first I need to make sure that Python is properly install. I hope this questionis not too basic and that I am asking on the right place.
I can't help with PyQT, and possibly this should have been two separate questions. But for Kivy the easiest way to get started is to download the portable package, which includes Python, Kivy, and all the dependencies compiled and ready to go. You can read the instructions for using the portable package here: http://kivy.org/docs/installation/installation-windows.html
If you really want to install Kivy yourself into an existing Python install, you can follow these instructions instead: https://github.com/kivy/kivy/wiki/Using-Kivy-with-an-existing-Python-installation-on-Windows-%2864-or-32-bit%29
Finally, to set up your IDE for use with the Kivy portable package (if necessary): https://github.com/kivy/kivy/wiki/Setting-Up-Kivy-with-various-popular-IDE%27s
Oh, one last caveat: we are working on Python 3 support, and Kivy will run perfectly in Python 3, but packaging is another matter. There are working packaging solutions for Windows apps using Python 3, but if you intend to deploy your app to Android or iOS you currently must use Python 2.
I'm running Eclipse (versions 3.6 and 3.5) on Ubuntu and I'm having trouble installing Eclipse plugins.
There is an easy way to install eclipse plugins in Eclipse, but this doesn't work for me on Ubuntu! This way only works properly under Windows and Mac OSX.
Just like in the tutorial, I create a folder inside my eclipse SDK folder that is named Links.
In this folder, I create a file eclipse-cpp-helios-linux-gtk.lnk or eclipse-cpp-helios-linux-gtk.link that contains this line:
path=/home/taher/opt/eclipse/Third-party-eclipse-links/eclipse-cpp-helios-linux-gtk
and save it, but when I start Eclipse doesn't recognize the plugin!
How can I resolve this problem?
With Eclipse Galileo (3.5) or Helios (3.6), I would rather recommend an external directory called 'mydropins' (for instance), which you can reference from your eclipse.ini, with the option:
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=C:/Prog/Java/eclipse_addons
This is called a shared dropins folder.
See in this SO answer an example of plugin deployment in this shared dropins folder.
(Your link refers to the previous provisioning mechanism, pre-p2.
P2 is the new provisioning system introduced late in Eclipse3.4, refined (debugged?) in eclipse 3.5 and 3.6.
See the supported dropins formats to check how you can organize your own personal dropins folder (that you can reuse between several eclipse installations)
You said you are using:
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=/home/taher/opt/eclipse/Third-party-eclipse-links
That means, under /home/taher/opt/eclipse/Third-party-eclipse-links, you:
won't have any .link file
will copy:
eclipse-cpp-helios-linux-gtk
eclipse
features
plugins
Note: the structure within eclipse-cpp-helios-linux-gtk should be the one describe above, for p2 to pick it up.