HTML-Graphs LIB for Python doesn't work - python

I'm an Ubuntu user and I've tried to make use of HTML-Graphs source code, that I need for my python script (well... it's not library but source code, I guess? If I needed anything for my scripts, I was just installing libraries through Ubuntu Softwate Center or pip command). Please, check HTML-Graphs here: http://www.gerd-tentler.de/tools/pygraphs/index.php?page=download. So my problem is: I download it as zip file... and then what? I tried to do comments like 'python graphs.py' in hope to "install it" (sorry, lack of words) but it didn't work out. What should I do to properly use the instructions from the HTML-Graphs source code? Thx!

You can copy the file graphs.py to your current project directory and then use it in your scripts with import graphs

Related

Importing module from Github to use in Python

I'm a beginner in Python and I have no experience with GitHub at all. I want to import the module semsimlib from the following URL: https://github.com/timvdc/semsimlib
I have looked on the internet for help on how to do this but most of it is very unclear and doesn't seem to work for me. Can anyone provide a detailed explanation on how to do this in a easy way?
It looks the repo does not provide appropriate scripts to simply install the package. There is no setup.py file and there is no distribution on pypi.
What you can do is go to site-packages folder inside your python installation or inside your virtual environment. Then run git clone https://github.com/timvdc/semsimlib. You should now be able to import semsimlib. Keep in mind that you will also have to install all the other dependencies your self one by one since there is also no requirements file.
You can also clone the repo into any folder on your computer and at the top of your script put:
import sys
sys.path.append("path/to/semsimlib/folder")
semsimlib will now be importable. However, I would try to get it to work with the first method.

How to install Python on Windows 10

I have uninstalled Python and now I cant install it anymore (error 0x800705b4). Has anybody encountered this error ? I have tried different versions but nothing works.
You can try Anaconda for Windows which has seperate environments.
The solution I would recommend though is to use WinPython, which after install is just a folder with everything you need, doesn't change a thing in your windows environment and still works great! There is also a version that comes with the most used packages already installed, give it a try!
No need to mess with environments, just use a different WinPython folder for your projects!
Got the same error after a little digging I found the below thing...It works like a charm...
First...Make sure to check the setup package for your system which is X86 or x64, download packages based on the system before you proceed, otherwise, the hack won't work. The below is explained for x64 bit windows 8.1 system with a 64 bit Python setup package use the below-mentioned setup name(.exe file) in Step1: and search in google for downloading the Python setup
Start CMD as Admin, after that
Step1: ~YourFilePath/python-3.5.0-amd64.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0
Step2:
~YourFilePath/python-3.5.0-amd64.exe
~YourFilePath stands for the location of the python-3.5.0-amd64.exe file on your PC Example: E:\Softwares\python-3.5.0-amd64.exe
now after executing Step2: the setup will run without any errors..... Cool...
The above-mentioned steps should work or else If you find any difficulties please visit here which explains the process in detail. Good Luck...
Credits to this answer
Eventually what did the trick for me was to roll back the previous microsoft update (KB4512575)

RobotFramework - Unable to import RemoteSwingLibrary

Screenshot of error in RobotFramework
Hello, I am trying to use the RemoteSwingLibrary in RobotFramework for testing. Other libraries I have been able to pip install just fine. However, RemoteSwing is not available with pip. I have a jar file of the library in the python27 folder with other libraries and have it explicitly listed in the path variable. Still receiving the error message that it does not see the module. Please advise. Thank you!
As the library is as jar file, Python interpreter with Python will not read it. You need to use Jython(java based python implementation)+Robot instead.
The reason for your issue is that you don't have it in the PYTHONPATH system/user variable.
This you can clearly see in the bug report where is listed.
You can add it to the system variables or use robot with a parameter where the path is specified:
robot --pythonpath c:\python37-32\libs\remoteswinglibrary-2.2.3.jar
btw. The guy from the different answer is absolutely missing the point. This is also part of the instruction for the installation RemoteSwingLibrary for pybot too and the reason for the existence of this project. The manual for installation is here.
You can look also here where is almost the same.

Undefined variable from import when using vtk

I am coding in python 2.7 using python-vtk 6.2.0 installed with the Ubuntu package manager.
I use eclipse + pydev as IDE and I can run the code successfully in shell and from within eclipse.
The only annoying problem I have is that the code analyser keeps posting errors of the type: Undefined variable from import: vtkxxxxxx whenever I do
import vtk
vtk.vtkTransformPolyDataFilter
vtk.vtkActor
vtk.vtkWhatever
I tried to reset the interpreter and I have also tried to manually add the library .so files to the PYTHONPATH, with no luck.
Also I can see the the vtk package in the project tree under system libs and I have no errors on the line import vtk
Is there a particular unusual way to include vtk library in pydev? Am I doing something stupid I do not see?
Thank you all!
I have found a similar question already asked about numpy. It has been solved so maybe you might find your answer in there. The URL for the issue is https://stackoverflow.com/a/14082269/7171962
Btw. This may be of no help to you.
I hope this helps.
had you gone through this link enter link description here
Hope this will help

How to install python modules on mac

I'm a complete beginner in Python programming. I have trouble installing/importing the module 'requests' on python. When I use my command terminal to install requests, I get a message that requests is already installed. However, when I try to import requests into the file I'm working on, python tells me there is no such module installed.
Sorry to bother you with this silly and probably easy question, thanks in advance!
If you use PyCharm (which is a great choice in my opinion), go to the tab Run and select Edit Configuration and in the window that just opened make sure the your Python interpreter is the one you used when you pip installed the package you asked about.
You can check your Python version or just see in PyCharm if the requests is actually installed by going to the tab File, select Settings, click on Project: name_of_your_project and finally check in Project Interpreter that the package is installed.

Categories

Resources