I'm operating on a windows 7 machine but because I don't have admin rights, I needed to use a portable version of python.
I'm following these two tutorials:
https://kivy.org/docs/installation/installation-windows.html#
https://github.com/kivy/kivy-designer
I was able to get kivy installed to my portable python path and I'm running into trouble with the 2nd tutorials
garden install filebrowser
I checked my installed modules and it says that I have kivy-garden:
['argh==0.26.1', 'docutils==0.12', 'gitdb==0.6.4', 'gitpython==1.0.1', 'jedi==0.9.0', 'kivy-garden==0.1.4', 'kivy.deps.glew== 0.1.4', 'kivy.deps.gstreamer==0.1.5', 'kivy.deps.sdl2==0.1.12', 'kivy==1.9.1', 'lxml==3.3.4', 'matplotlib==1.3.1', 'numpy==1.8.1', 'pandas==0.11.0', 'pathtools==0.1.2', 'pil==1.1.7', 'pip==8.0.2', 'py2exe==0.6.9', 'pycairo==1.8.10', 'pygame==1.9.1','pygments==2.1', 'pygobject==2.28.3', 'pygoocanvas==0.14.2', 'pygtk==2.24.0', 'pygtksourceview==2.10.1', 'pyodbc==3.0.7', 'pyparsing==2.0.1', 'pypiwin32==219', 'pyrsvg==2.32.1', 'pyserial==2.7', 'pywin32==218', 'pyyaml==3.11', 'requests==2.9.1', 'scipy==0.13.3', 'setuptools==19.4', 'six==1.10.0', 'smmap==0.9.0', 'watchdog==0.8.3', 'wheel==0.26.0']
I tried to launch the designer's main.py without the file browser and I get the following error:
Traceback (most recent call last):
File "C:\Sources\Portable_Python_2.7.6.1\kivy-designer-master\main.py", line 2, in <module>
from designer.app import DesignerApp
File "C:\Sources\Portable_Python_2.7.6.1\kivy-designer-master\designer\app.py", line 28, in <module>
from kivy.garden.filebrowser import FileBrowser
ImportError: No module named filebrowser
Which it appears I cannot do unless I install the filebrowser.
Has anyone run into this before? I don't care if I don't have a file browser, I really just want the Kivy Designer to work because I'm still learning Python GUI modeling and having a designer would make it so much easier. Many of the tutorials I've looked at talk about using the Kivy.bat, but I have searched everywhere and when you using the installation on windows, a Kivy.bat is never created.
Related
I am struggling to install and import python libraries into my programs. originally I was using pydev but I kept getting messages like:
Traceback (most recent call last): File "C:\Users\satur\eclipse-workspace\DMD experimental\Main.py", line 11, in <module> from matplotlib import pyplot as plot ModuleNotFoundError: No module named 'matplotlib'
I installed matplotlib using py -m pip install matplotlib which produced a few messages like this.
WARNING: The script f2py.exe is installed in 'C:\Users\satur\AppData\Local\Programs\Python\Python310\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The scripts fonttools.exe, pyftmerge.exe, pyftsubset.exe and ttx.exe are installed in 'C:\Users\satur\AppData \Local\Programs\Python\Python310\Scripts' which is not on PATH.
I was unsure what this meant so I tried running my program again and got the module not found error again.
being unable to resolve the issue I moved over to spyder because it came with many of the libraries I wanted thus avoiding the issue. however, as soon as I tried to import and install libraries not included with spyder I encountered the module not found error and a similar warning about the path. I added the paths mentioned in the warning to the PATH in spyder now when I run my code get this error message:
runfile('C:/Users/satur/.spyder-py3/proper orthogonal decomposition/dynamic mode decomposition experimental driver.py', wdir='C:/Users/satur/.spyder-py3/proper orthogonal decomposition')
Traceback (most recent call last):
File "C:\Users\satur\AppData\Local\Programs\Spyder\pkgs\spyder_kernels\py3compat.py", line 356, in compat_exec
exec(code, globals, locals)
File "c:\users\satur\.spyder-py3\proper orthogonal decomposition\dynamic mode decomposition experimental driver.py", line 13, in <module>
import mat73
File "C:\Users\satur\AppData\Local\Programs\Python\Python310\Lib\site-packages\mat73\__init__.py", line 11, in <module>
import h5py
File "C:\Users\satur\AppData\Local\Programs\Python\Python310\Lib\site-packages\h5py\__init__.py", line 25, in <module>
from . import _errors
ImportError: cannot import name '_errors' from partially initialized module 'h5py' (most likely due to a circular import) (C:\Users\satur\AppData\Local\Programs\Python\Python310\Lib\site-packages\h5py\__init__.py)
I did some looking around and found this
https://github.com/spyder-ide/spyder/wiki/Working-with-packages-and-environments-in-Spyder#installing-packages-into-the-same-environment-as-spyder
I followed what instructions I understood
import sys; sys.executable
Out[50]: 'C:\\Users\\satur\\AppData\\Local\\Programs\\Spyder\\Python\\python.exe'
which is different from what I get when I run it in command prompt or in the pydev terminal both of which give me
C:\Users\satur\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe
when i go to C:\Users\satur\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\ I see: 3 versions of idel, 3 versions of pip, and 6 versions of python.
I am deeply confused. I want to install and import libraries into my python programs. I want to be able to run my programs in either (or for that matter any) ide. I seem to be hitting the very similar issues in both. every tutorial I have found online describes the steps to take to do this but not what they are or why I am doing them none of them seem to work and the more times I try to install things the more confused I get.
could someone please explain: how to install and import libraries into a python program. what python is doing when I install things and try to import them. and why both IDEs have similar but different errors.
I've been working on a basic Django project and I deployed it to AWS Elastic Beanstalk. I'm not sure if that's causing this, but I'm just telling you this so that you know what I might have been done with my project. Then, my python project interpreter got kinda messy and when I try to run the application it started to give me some errors about missing packages. After that, I checked my project interpreter, and it was like this:
Then, I tried to install the required packages using PyCharm, however, it kept giving me the error below. I also tried to build some of those packages manually, like Django, on my own terminal but the error was same. Further, I was able to install packages on other python versions on my mac, which sorta tells I might have messed my default python interpreter somehow.
40:357: execution error: Traceback (most recent call last): File
"/var/folders/f1/k7c234sx5fn9j84yt130_znr0000gn/T/tmp2zDEZTpycharm-management/pip-9.0.1/setup.py",
line 6, in
from setuptools import setup, find_packages File "/Users/bkaankuguoglu/Library/Python/2.7/lib/python/site-packages/setuptools/init.py",
line 12, in
import setuptools.version File "/Users/bkaankuguoglu/Library/Python/2.7/lib/python/site-packages/setuptools/version.py",
line 1, in
import pkg_resources File "/Users/bkaankuguoglu/Library/Python/2.7/lib/python/site-packages/pkg_resources/init.py",
line 72, in
import packaging.requirements File "/Users/bkaankuguoglu/Library/Python/2.7/lib/python/site-packages/packaging/requirements.py",
line 59, in
MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker") TypeError: call() takes exactly 2 arguments (1 given) (1)
I'd really appreciate any help here and please ask me if any extra detail is needed to answer this question before downvoting.
pip install setuptools==33.1.1
I am trying to import the spherical harmonic toolbox (SHTOOLS) in python. I have the files downloaded and unzipped and am using RedHat.
I added the package's path to my python system path and when I go to import the package, I get this error:
>>import pyshtools
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pyshtools/__init__.py", line 49, in <module>
load_documentation()
File "pyshtools/__init__.py", line 27, in load_documentation
from . import _SHTOOLS
ImportError: cannot import name _SHTOOLS
I can not seem to figure out what the issue is. I checked that the path to this folder was actually added to the system path and it was.
Is this an issue on my end? Or is it possible that I have something downloaded incorrectly? If so, how would I go about fixing this issue?
The SHTOOLS package needs to be built with make first to compile the Fortran libraries. The wiki on Github gives directions on which libraries are required - libblas-dev, liblapack-dev, g++, gfortran, and libfftw3-dev (these are the Ubuntu packages, they may have slightly different names on Redhat). Once these are installed, you need to run make, then sudo make all to install the Fortran and Python components. The Makefile has a lot of good comments in it, I'd recommend reading through it before running make.
I primarily use python for scientific computing and have become quite accustomed to Spyder. I am working on a mutlimedia project and would like to use the Gstreamer bindings for python. The best way I could find to install Gstreamer on Windows was through PyGi.
Now the problem, import gi works fine in both python and Ipython loaded in a command prompt. However, trying to do the same in Spyder results in:
Traceback (most recent call last):
File "<ipython-input-1-a23efdcdbcd8>", line 1, in <module>
import gi
File "C:\Users\Conner\Anaconda\Lib\site-packages\gi\__init__.py", line 42, in <module>
from . import _gi
ImportError: DLL load failed: The specified module could not be found.
I made sure the interpreter was the same and added C:\Users\Conner\Anaconda\Lib\site-packages to the PYTHONPATH to no avail.
I could develop it outside of Spyder but I am damn stubborn and I don't like when things don't work.
I'm having fun with python, and would like to learn gui programming.
I installed pygtk, and gtk but I get this message when I try to import gtk:
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import gtk
File "C:\Python27\lib\site-packages\gtk-2.0\gtk\__init__.py", line 40, in <module>
from gtk import _gtk
ImportError: DLL load failed: The specified procedure could not be found.
First I tried downloading and installing from several different sources. That didn't work, now I have Gtk+ and GTK2 Runtime folders in my program files.
I take it that these are different versions of GTK runtime?
Next I googled this, and found suggestions to make sure GTK was in my path. I've added every combination of paths to the lib and bin folders in these two directories. Still not working.
What should I try next?
Thanks.
PyGTK itself has several dependencies (cairo et al), did you install all of them?