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
Related
for my master thesis, I have to render some maps from OpenStreetMap information. Unfortunately, I'm not able to install mapnik.
In the manual (https://github.com/mapnik/mapnik/wiki/WindowsInstallation) it said I should Add ";C:\mapnik-v2.2.0\lib" to the PATH variable. In my case it is "C:\Users\User\Mapnik\lib". I cloned the git repo and updated it to v3.0.23. Like it said here: https://mapnik.org/pages/downloads.html
But in this location, I don't have lib. Also, I don't have bin. So I'm a little bit confused about how to install mapnik.
I would really appreciate your help.
Some more Information: OS is windows 10, For Python, I'm using Anaconda with a 2.7 Instance just for mapnik... even if I read, that I could go with python 3. For the rest of my code, I go with Python 3.8. For sure I would prefer to stay at 3.8 but if it only works with 2.7 I would also use that.
Error message: "(Mapnik) C:\Users\User\Mapnik\demo\python>python rundemo.py
Traceback (most recent call last):
File "rundemo.py", line 25, in
import mapnik
ImportError: No module named mapnik"
I am using Python 3.6 on Windows 7 and I have a problem with the igraph package. I was having errors while I was trying to install it using pip, so I decided to install it from the .whl file. Unfortunately, I couldn't find version appropriate for Python 3.6, so I downloaded another version and changed the name of the file so that it looked like it was designed for Python 3.6. The installation was successful, but when I am trying to run a script which uses the igraph module - a following error message appears:
Traceback (most recent call last):
File "C:/Users/Jarek/Documents/Studia/Programowanie/Python na studiach/Analysis of Unstructured Data/List2.py", line 6, in <module>
import igraph as ig
File "C:\Users\Jarek\AppData\Local\Programs\Python\Python36-32\lib\site-packages\igraph\__init__.py", line 34, in <module>
from igraph._igraph import *
ModuleNotFoundError: No module named 'igraph._igraph'
I haw a very similar issue under Python igraph import error on Windows
but there was no answer there. I have also seen
No module named 'igraph._igraph' but suggestion given there does not help me (or I do not know how to properly apply it).
Any help will be greatly appreciated. Thanks in advance.
I couldn't find version appropriate for Python 3.6, so I downloaded another version and changed the name of the file so that it looked like it was designed for Python 3.6.
So the trick didn't work. Use Python 2.6 or 2.7. Or compile from sources.
Installing OpenCV from prebuilt binaries
Below Python packages are to be downloaded and installed to their default locations.
Python-2.7.x.
Numpy.
Matplotlib (Matplotlib is optional, but recommended since we use it a lot in our tutorials).
Install all packages into their default locations. Python will be installed to C:/Python27/.
After installation, open Python IDLE. Enter import numpy and make sure Numpy is working fine.
Download latest OpenCV release from sourceforge site and double-click to extract it.
Goto opencv/build/python/2.7 folder.
Copy cv2.pyd to C:/Python27/lib/site-packages.
Open Python IDLE and type following codes in Python terminal.
import cv2
print cv2.version If the results are printed out without any errors, congratulations !!! You have installed OpenCV-Python
successfully.
import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <modul
ImportError: No module named cv2
I am trying to get tesseract and opencv up and running for past 2 days.I had uninstall python 3 and almost everything related to it as most of the modules ran in python 2.7 .Still after reverting back python 2.7 and reinstalling everything still its showing No module named cv2.Am at my wits end .Please help me
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
I want to use the python wrapper from igraph. Compiling igraph and installing python-igraph works fine, but when I try to import igraph I get the following error (see image link below):
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.4/dist-packages/igraph/__init__.py", line 34, in <module>
from igraph._igraph import *
ImportError: /usr/local/lib/python3.4/dist-packages/igraph/_igraph.cpython-34m.so: undefined symbol: igraph_gomory_hu_tree
Error message screenshot
I also had some trouble with igraph and python, my solution:
delete your currently installed version of igraph and python-igraph
create a new virtualenv with pyvenv-3.4 yourVenv
activate the virtualenv . yourVenv/bin/activate
install python-igraph within the virtualenv pip install python-igraph
That one works for me.
Try using the 'wraptext' import that comes with python. Then use .fill() to wrap the text over the next line. That might work.
It's because python doesn't find the igraph library. You can simply export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ (or wherever the file libigraph.so is located on your system).
FYI: Tried for more than a day with all kinds of resources online for installing python-igraph on mac. And I also wasn't able to import graph in .py file or .ipynb. Though it did allow me to import igraph in terminal when launching python. My solution is to make a virtual environment, conda install -c conda-forge python-igraph, then switch python from version 3.8 (which never passes the igraph.test.run_tests, Failed = 2) to 3.5 (passed the test). Hope it helps.