How to install PyGTK MacOs catalina 2020 - python

I am trying to install a software called p4vasp:
https://github.com/orest-d/p4vasp/blob/master/README.MacOS.
I am getting this error message:
You need to get version 2.0 (or later) of PyGTK for this to work. You can get source code from http://www.pygtk.org
So I go there and follow the steps, but when I try to run the python script hello.py it fails:
File "hello.py", line 1, in
import gi
ImportError: No module named gi.
I think this could the problem.
pygobject3 3.36.1 is already installed and gtk+3 3.24.22 as well.
I have tried all the solutions, none worked so far.. Could someone help me please?
Thank you in advance.
Best wishes to all

Related

ModuleNotFoundError, even after pip install

I have recently bought a new laptop and was viewing some python projects of mine which I made on my pc. For one of them I use the python-bitvavo-api library which I installed using pip3 install python-bitvavo-api. The version I installed is 1.2.2 which is the latest on their website.
Now when I try to import it using this code: from python_bitvavo_api.bitvavo import Bitvavo, I get the following error:
Traceback (most recent call last):
File "C:\Users\indig\OneDrive\Documenten\Python Projects\Personal\Cryptone\Cryptone.py", line 6, in <module>
from python_bitvavo_api.bitvavo import Bitvavo
ModuleNotFoundError: No module named 'python_bitvavo_api'
I read online that it may occur when using multiple python versions, Im only using 1 and thats python 3.7
Btw. I have the same error with the Pillow module, so it might be a setting in visual studio that I dont know of. Anyway, someone please help. If you need more details please ask.
How are you running it? From the terminal or from VS?
You can also check the installed libraries running the command pip list

Cannot import scipy.optimize due to absent dylib

Could you please help me? 2 weeks ago I did brew upgrade and that somehow broke some dependencies in my Python project (I think that was the cause as it was compiling before) and I cannot seem to import scipy any more. The error message I am struggling with is the following:
ImportError: dlopen(/Users/albydeca/indProjSource/venv/lib/python2.7/site-packages/scipy/optimize/minpack2.so, 2):
Library not loaded: /usr/local/lib/gcc/x86_64-apple-darwin14.0.0/4.9.2/libgfortran.3.dylib
Referenced from:/Users/albydeca/indProjSource/venv/lib/python2.7/site-packages/scipy/optimize/minpack2.so
Reason: image not found
Triggered from :
File "/Users/albydeca/indProjSource/venv/lib/python2.7/site- packages/scipy/optimize/linesearch.py", line 18, in <module>
from scipy.optimize import minpack2
This is due to the fact that my path is as follows:
/usr/local/lib/gcc/x86_64-apple-darwin13.1.0/4.7.3
and fortran.3.dylib is not there
I have tried searching how I can get that folder but brew installing gcc49 does not do the job. My gcc choices are either 5 or x86_64-apple-darwin13.1.0
Have you encountered this or similar messages before? Do you know how I can fix this?
Thanks in advance
I know how to avoid this problem. Get a Python Distribution that has scipy included already. It's called Anaconda from https://www.continuum.io/downloads
To avoid this problem in the future is stop messing with your main environment by instead using virtualenv's or conda environments.

Difficulty installing combinatorics module on Mac OSX

I attempted to run the program that plays mastermind, here:
http://www.python-course.eu/mastermind.php
To do so, I installed python3.4.3 first.
I ran the program, but it returned:
Traceback (most recent call last):
File "mastermind_p1_trim.py", line 5, in <module>
from combinatorics import all_colours
ImportError: No module named 'combinatorics'
So I navigated to https://pypi.python.org/pypi/Combinatorics
and downloaded it, then ran python3
python3 setup.py install
from within the Directory downloaded.
This returned
Writing /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Combinatorics-1.4.5-py3.4.egg-info
finally, sys.path returns
['', '/Library/Frameworks/Python.framework/Versions/3.4/lib/python34.zip', '/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4', '/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/plat-darwin', '/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/lib-dynload', '/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages']
when running python3.
So, I do not know why I am still receiving the error,
ImportError: No module named 'combinatorics'
I have looked at other similar pages on SO, but the suggestions there do not seems to solve my problem. Could anyone help me figure this out?
Combinatorics might not be compatible with Python 3.4.3
Here are some suggestions:
Un-install Python 3.4.3 and all it's resources
Install python 2.7
Install combinatorics
Read more in detail
Here is a guide from ActiveState:
Download and install ActivePython
[IGNORE THIS] Buy and install the Business Edition license from account.activestate.com
Open Command Prompt
Type pypm install combinatorics

Using Import for PIP Installed Packages While Using Kivy on Windows

I am trying to use the Python module pyowm with Kivy and am having problems getting the import statement to work. I am on Windows 8.1 and downloaded pyowm using PIP. When I try and use "import pyowm" and then send the file to Kivy.bat it says "No module named pyowm" but when I just run a program that uses only pyowm from command line it works.
Any help would be greatly appreciated.
Cheers
The kivy portable package includes its own python, but it sounds like you have installed pyowm into some other python installation.
I haven't used the windows package, but I think somewhere in it there should be a way to run its internal pip. If nobody responds here, someone on the kivy mailing list or irc probably knows.

Unable to run scrapy for Python

I am new to this platform as well as to Python scraping. I hope that my question will still be understandable and somebody can help me. Sorry, in case I make something unclear...
I have already checked other posts on a similar topic but could not manage to overcome my problem.
I am currently getting into web-scraping and wanted to try Scrapy. Therefore, I followed the installation instructions on the website. http://doc.scrapy.org/en/0.16/intro/install.html#intro-install
After I had figured out how it works I decided to run in a virtual environment.
I installed virtualenv and pip.
Then I installed Scrapy.
When I now want to start with the tutorial
scrapy startproject tutorial
I get the following error message:
File "/Users/XXX/environment_trial/bin/scrapy", line 3, in <module>
from scrapy.cmdline import execute
File "/Users/XXX/environment_trial/lib/python2.7/site-packages/scrapy/cmdline.py", line 7, in <module>
from scrapy.crawler import CrawlerProcess
File "/Users/XXX/environment_trial/lib/python2.7/site-packages/scrapy/crawler.py", line 3, in <module>
from twisted.internet import reactor, defer
ImportError: No module named twisted.internet
(environment_trial)XXX-iMac:~ XXX$
I could not find a Twisted.py on my Mac as suggested by other posts.
Can somebody please tell me what to do?
Simply put, you need to install twisted. You can get it from the download page. It looks like you'll need to install from source on a newer Mac, but that's just a case of extracting the tarball and running python setup.py install in the extracted folder.
edit: Since you already have pip installed, you can also grab twisted with it.
pip -E twisted_env install -U twisted
Please be sure that all the binaries that you are installing correspond to the exact same version of python that you have installed (For e.g python 2.7 ).
I did this mistake of installing pyopenSSL for python3.6 and it took me a lomng time to realize that versions did not match.

Categories

Resources