Python: Problem importing pycurl - python

I am working on OpenSolaris(2009.06) OS. i recently installed the pycurl libraires using the following command:
$> python setup.py install --curl-config=/usr/local/bin/curl-config
the installation went perfectly fine. However now when i am trying to import the pycurl library in my python program, an error is being reported
>>>import pycurl
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: ld.so.1: isapython2.4: fatal: libcurl.so.4: open failed: No such file or directory
I cant figure out where exactly i am going wrong. Any help...?
Thanks in advance.
Shubham

Sounds like your loader doesn't know where to find the cURL library. See your OS documentation for how to specify locations to search.

Related

ModuleNotFoundError: No module named 'feedparser'

I have Python 3.11 and I have done everything expect Anaconda thing in this video below to try and fix this issue.
https://www.youtube.com/watch?v=RvbUqf3Tb1s&t=181s&ab_channel=TechWithTim
Here is the error:
C:\Python311\python.exe
C:\Users\16789\PycharmProjects\cyberNewsfeed\main.py Traceback (most
recent call last): File
"C:\Users\16789\PycharmProjects\cyberNewsfeed\main.py", line 1, in
import feedparser ModuleNotFoundError: No module named 'feedparser'
Attached is a screenshot of my interpeter and structue.
Tried everything in the linked video besides anaconda and i was expecting it to run. I restarted my computer as well.
You have to install the missing package. Try this in a shell inside your python environment.
pip install feedparser

Python Opencv DLL load failed - Windows 10

This is an error that I've seen in several different places but none of the listed solutions have worked for me.
I'm trying to use opencv but when I import the module I get the following error:
>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: DLL load failed: The specified module could not be found.
I have tried installing opencv from a pre-downloaded package, my computer has the current windows media pack and I jave run the module the depends without it listing any dependecy errors, I'm not sure what else to try at this point.
Edit: I have also tried installing opencv-contrib-python to no avail.
Let me know if you have any suggestions.
I had faced a similar issue and I solved it using:
pip install opencv-contrib-python
I updated from python 3.7.3 to python 3.7.6 and it fixed the problem. Worth a shot if you have the same issue.

Why won't Python recognize that PyPDF2 is installed?

I'm trying to import PyPDF2 and it won't work. I installed it using pip, then tried it with pip3, it is installed. When I try to import I get the error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'PyPDF2'
I'm using Python 3.7. I found a similar issue here, doesn't seem any of the answers worked and I tried them myself to the same results.
If anyone else runs into this problem try using sys.path to find the site-packages directory. I copied my PyPDF2 packages into my Python37 directory and now it works.

Issues importing dateutil when using PyInstaller

So, I am trying to create an exe using PyInstaller. My application worked fine before adding a feature with matplotlib. Now I get an import error with dateutil. I have added dateutil to the hidden imports and PyInstaller keeps returning the following error:
ERROR: Hidden import 'dateutil' not found
I did some drilling down and just made a simple file to recreate the issue and see if it was the matplotlib package or something due to dateutil.
The following script hello.py runs in my environment with no import errors:
import dateutil
print "Hello World"
When building with PyInstaller with the following command:
pyinstaller --onefile hello.py
I still get the error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named dateutil
I have found some hints that there might be some existing problems importing dateutil but nothing that helps my specific case. I have tried making a hook for dateutil and it doesn't seem to get run by PyInstaller, so I worry importing dateutil is not the name PyInstaller sees it as, but I don't know what else it could be (I tried python_dateutil and python-dateutil as well, neither worked). I also tried the --debug flag to see if I got more information, but all I saw was:
LOADER: Running hello.py
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named dateutil
I am missing something and I can't figure it out. I hope someone out there can help me out.
Note: Using Python 2.7.9, PyInstaller 3.0 and dateutil is version 2.4.2
Thanks!

Run-Install python-meep Error

I am new in python meep. I try to use python-meep on Ubuntu 10.04 64 bit (virtual machine).
I install all the necessary things like PCRE swig and python meep, but when I try to run the samples it gives me the same error as in the beginning:
~/Desktop/Python/python-meep/samples/bent_waveguide$ python python_meep_bent_wg.py
Traceback (most recent call last):
File "python_meep_bent_wg.py", line 21, in <module>
from meep import * # make it 'meep_mpi' for MPI-meep and 'meep' for non-MPI meep
File "/usr/local/lib/python2.6/dist-packages/meep.py", line 4693, in <module>
import scipy.weave
ImportError: No module named scipy.weave
(about scipy I have a problem to install it - I get the message:
Error: Dependency is not satisfiable: python (<< 2.6)
... so I install it with dpkg -i, and then made some updates but in the end I have some kind of broken packages)
Right now I am really stuck and have no idea what to do. Maybe somebody has an idea how to fix it or install it correctly overcoming all these problems.
Try to use the python-setuptools, so you install the stuff with pip or easy_install.

Categories