Python 2.7.3 installation on xUbuntu - python

I downloaded python sources. When I do configure, everything fine, but when I do make, it says that Tcl/Tk library not found. Where can I find all packages required by python?
Thanks in advance.

Look at the DSC file for the Ubuntu python2.7 package to find the Build-Depends and apt-get install all of them before building Python.

http://www.tcl.tk/software/tcltk/download.html
This has worked every time I needed it to. Make sure to read the INSTALL and/or README files as I remember it has a somewhat non-standard method of installation...

Related

Windows: Get all modules/packages used by a python project

I have an application and now I would like to know what packages/modules are necessary if someone else wants to install it. How can I get all the python modules/packages that are needed for a specific project?
Important Note: This question was already answered for Linux. They suggested pipreqs, which seems like a great solution, however it does not to support Windows.
My Python version is 3.6.4.
I am working on windows 10.
Have you verified that pipreqs does not work? I use Windows 10 (build 17134.285), Python 3.7.0, and pipreqs 0.4.9; and I have successfully generated requirements files using pipreqs.
C:\l\Projects\MicrosoftGraph>pipreqs .\sampleGraphAuthPython
INFO: Successfully saved requirements file in .\sampleGraphAuthPython\requirements.txt
C:\l\Projects\MicrosoftGraph>type .\sampleGraphAuthPython\requirements.txt
bottle==0.12.13
adal==1.1.0
Flask_OAuthlib==0.9.5
requests==2.19.1
Flask==1.0.2
requests_oauthlib==1.0.0
urllib3==1.23
Maybe you could use: pip freeze ?
This would output all the installed packages for your given project, for reference.
Hopefully that helps!

How to install co-simulation support for myHDL

I am trying to setup myHDL with Python2 on Windows 10 in order to work with VHDL/Verilog testbenches using Python for the source code. The corresponding instructions can be found here.
I have successfully installed python, pip and then myHDL on my system. Now to setup co-simulation, I can't make sense of the instructions given:
Co-simulation requires an additional installation step.
To install co-simulation support:
Go to the directory co-simulation/ for your target platform
and following the instructions in the README.txt file.
Which directory is being referred to here? I can't find a co-simulation directory after installing myHDL in my C:/Python27 directory/sub-directories.
The FAQ section addresses this issue by suggesting the use of Cygwin. Can someone suggest how to implement this or if there is an alternative method that I can work with?
The cosimulation directory can be found in ~/.local/share/myhdl directory.
For my Cygwin installation, it was here:
/usr/share/myhdl/cosimulation

PySide2 on windows

Does anyone know where I can find a pip-install for PySide2?
It's 2017 and I can't seem to find a pip install or site-package containing the binaries for PySide2. I prefer not to deal with downloading the source code and compiling it myself, as that usually ends up being a huge headache as it's never a smooth process. Also considering it's highly likely someone else has already done it. If I were to be honest here, if I attempted to compile it myself and errors popped up, I wouldn't really know where to begin solving them, nor do I want to spend time doing that.
I just find it hard to believe I can't find it anywhere online or even in PIP when a lot of applications in the VFX industry are switching to PySide2.
I hope someone can help me out.
Thanks
Same Problem...
So i tried to build it. But there are Problems building the WebKit.
Hence my windows binaries are actually without a webkit binding.
You can obtain it through PyPI:
pip install PySide2
or if it fails (most likely because your pip executable is bound to python 2) try:
pip3 install PySide2
or even better:
python -m pip install Pyside2
This assumes that python is bound to Python 3, that way you're really sure about the Python version used, see Why you should use python -m pip.
There are wheels available by Fredrik Averpil here built with Qt 5.6.
Claudius Hansch's answer provides a wheel using Qt 5.9.
In any case, don't forget to either
set the QT_QPA_PLATFORM_PLUGIN_PATH environment variable as described here
or
create a qt.conf file in the folder of your python.exe with the content
[Paths]
Prefix = /dir_to_site-packages/PySide2
Binaries = /dir_to_site-packages/PySide2
PySide2 is now available on pypi so a simple
pip install PySide2
should work on Windows, OSX, and linux!
I use Python 3.7 on windows 10 pro, 64bit.
Installing via pip failed for me.
I ended up downloading the wheel from qt directly
QT official download page
and install the downloaded wheel which worked fine.

Is it practical to have both Python 2.7 and 3.3 installed at the same time?

I am using pip to pull down libraries but didnt realize the key one is only for 2.7. So now I am working in the 2.7 directory but pip is still installing libs in 3.3. So pyCharm keeps saying the lib is missing.
I have the PATH var set (this is gasp fn windows 8) so that Python 2.7 comes first but i think the python exe isn't looking in the first place I had pip install things. Maybe there is a setting in pip that will install it elsewhere now?
Any hints on how to make this work would be great. Maybe I just need to start over w/o python 3.3?
Thank you for your time!
Try these two solutions:
1)Remove python3.3 from the path variable and try installing library using pip now. so that pip from python27 can install things.
2)if this doesn't work then use
C:\python27\Scripts\pip.exe install
Oh My Crap, this is so easy. Thank you to AMWinter for this:
http://www.virtualenv.org/en/latest/virtualenv.html
It seems to manage all this chaos of the Python version (and library versions) for me easy. Of course I needed to tell it the python version (with flag -p) but that was it.
(although it did not put pip where it said it would - just pls note)
Dirk and Bakuriu are appreciated as well. Like Ruby, I realize managing versioning is a necessary evil.
Thank you all!

Opencv 2.2 not recognized on Python 2.7 (Ubuntu/Windows XP)

I've been trying to connect opencv and python in both Ubuntu and Windows XP. I've failed on both.
I've read many webpages and threads about "how to install" it but none has worked (the worst part is that they all say kind of the same).
Steps (windows xp):
Installed Python 2.7 by default (works perfectly)
Installed PIL and cx_Freeze (may they
create a conflict? I don't think so
:s)
Installed Opencv 2.2 by default
(OpenCV-2.2.0-win32-vs2010.exe) and
it isn't recognized inside a py nor
as import opencv.cv nor using the
cookbook way, import cv (I skipped
the visual studio steps since I'll
use it with python)
Checked path (it's ok, it has the
Opencv2.2\bin thing)
Rechecked webpages and stuff
Steps (ubuntu):
Had python working
sudo apt-get install, cmake, make,
sudo make install, etcetc (from the
tutorials)
same thing... module not recognized
Please can you help?
Update:
I managed to install it and have it recognized by the system (I used http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv and it worked perfectly after that).
The problem now is that it crashes when I try to use CaptureFromFile. Someone else has reported it 3 days ago so now I wait.
I'll check the other wrappers, maybe one of them will work.
For windows see my web page: http://www.modernmind.org/wiki/OpenCV
For Ubuntu you should just need to apt-get install python-dev then generate the make files with Cmake, build it and then make install. In order to build the python bindings you need to have the python header files on your system and you probably don't. When you run configure in Cmake make sure that you don't see any messages at the top about PYTHON_INCLUDE not being defined.
To access a library it needs a Python library installed in the Python version you are using. From what you write above it seems to me that you install OpenCV in general, but that you don't specifically install the Python library. This is why it doesn't work.
I'm not sure how to install the Python wrappers, and the OpenCV documentation is a bit sparse on that info. But if you did build them (and that needs to be turned on explicitly, says the docs) they seem to end up in opencv/release/lib .
Look at "Testing Python wrappers" on http://opencv.willowgarage.com/wiki/InstallGuide
If there is still no luck, there is a bunch of alternative Python wrappers available: http://pypi.python.org/pypi?%3Aaction=search&term=opencv&submit=search
Maybe they are better documented.

Categories