I'm trying to import paramiko so I can ssh to machines from my windows 10 machine using a python program. However I receive this error:
Traceback (most recent call last):
File "population_script.py", line 5, in <module>
import paramiko
File "C:\Users\bnbih\Envs\crossover_env\lib\site-packages\paramiko\__init__.py", line 22, in <module>
from paramiko.transport import SecurityOptions, Transport
File "C:\Users\bnbih\Envs\crossover_env\lib\site-packages\paramiko\transport.py", line 57, in <module>
from paramiko.ed25519key import Ed25519Key
File "C:\Users\bnbih\Envs\crossover_env\lib\site-packages\paramiko\ed25519key.py", line 17, in <module>
import bcrypt
File "C:\Python27\Lib\site-packages\bcrypt\__init__.py", line 23, in <module>
from bcrypt import _bcrypt
ImportError: DLL load failed: The specified module could not be found.
I tried : pip install bcrypt and pip install --upgrade bcrypt
Related
I installed pycurl for python3
but when I want to import it to Pycharm and use it I get this error message:
Traceback (most recent call last):
File "/home/cours/PycharmProjects/untitled2/venv/test.py", line 1, in <module>
import pycurl
ModuleNotFoundError: No module named 'pycurl'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in <module>
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
Original exception was:
Traceback (most recent call last):
File "/home/cours/PycharmProjects/untitled2/venv/test.py", line 1, in <module>
import pycurl
ModuleNotFoundError: No module named 'pycurl'
But when I install it with the Pycharm terminal (pip install pycurl) I get this message
Requirement already satisfied: pycurl in /usr/lib/python3/dist-packages (7.43.0.1)
I also already imported the package with : Settings -> Python Interpreter
And finally i also used : "Inherit global site-package" option of the project and the problem is the same
I have no idea what else i can do
use command this command to install package -
pip3 install pycurl
and also check the Pycharm python version in for code compile
I've installed xxhash module with:
sudo pip install --upgrade pip
sudo pip install xxhash
But when I execute:
pydoc modules
I get a list of available modules in which there's no xxhash.
And when I run in terminal a GUI program it gives me an error:
Python: Traceback (most recent call last):
File "./runserver.py", line 34, in <module>
from pogom.search import search_overseer_thread, fake_search_loop
File "/SOME_PATH/resources/app/map/pogom/search.py", line 30, in <module>
from pgoapi import PGoApi
File "/SOME_PATH/resources/app/map/pogom/pgoapi/__init__.py", line 39, in <module>
Python: from .pgoapi import PGoApi
File "/SOME_PATH/resources/app/map/pogom/pgoapi/pgoapi.py", line 34, in <module>
from .rpc_api import RpcApi
File "/SOME_PATH/resources/app/map/pogom/pgoapi/rpc_api.py", line 47, in <module>
from .utilities import to_camel_case, get_time, get_format_time_diff, Rand48, long_to_bytes, generateLocation1, generateLocation2, generateRequestHash, f2i
File "/SOME_PATH/resources/app/map/pogom/pgoapi/utilities.py", line 37, in <module>
import xxhash
ImportError: No module named xxhash
BTW, the 2 first commands worked with no error and when I rerun them it says that these modules are already installed and up to date.
Hi I installed python using "homebrew install python".
A script which was already running started throwing below error.
Traceback (most recent call last):
File "TestConnection.py", line 1, in <module>
from TextUpdater import TextUpdater
File "/Users/gepaul/code/external-tools/tools/Scripts/TextUpdater.py", line 1, in <module>
from GSHelper import GSHelper
File "/Users/gepaul/code/external-tools/tools/Scripts/GSHelper.py", line 2, in <module>
import gspread
File "/Library/Python/2.7/site-packages/gspread/__init__.py", line 21, in <module>
from .client import Client, login, authorize
File "/Library/Python/2.7/site-packages/gspread/client.py", line 19, in <module>
from .httpsession import HTTPSession, HTTPError
File "/Library/Python/2.7/site-packages/gspread/httpsession.py", line 16, in <module>
from http import client
ImportError: cannot import name client
Any Idea why this happened?
Python version is Python 2.7.6
I'm trying to install py2neo on an offline machine. I can't use pip because I'm not connected to the internet. I'm trying to install py2neo-2.0.3 with python2.7.9 on redhat. When I run python setup.py install I get ImportError: cannot import name HTTPSConnection.
Traceback (most recent call last):
File "setup.py", line 29, in <module>
from py2neo import __author__, __email__, __license__, __package__, __version__
File "usr/lib/py2neo-2.0.3/py2neo/__init__.py" line 27, in <module>
from py2neo.core import *
File "usr/lib/py2neo-2.0.3/py2neo/core.py", line 28, in <module>
from py2neo.env import NEO4J_AUTH_TOKEN, NEO4J_URI
File "usr/lib/py2neo-2.0.3/py2neo/env.py", line 21, in <module>
from py2neo.packages.httpstream.packages.urimagic import URI
File "usr/lib/py2neo-2.0.3/py2neo/packages/httpstream/__init__.py", line 32, in <module>
from .http import *
File "usr/lib/py2neo-2.0.3/py2neo/packages/httpstream/http.py", line 31, in <module>
from httplib import (BadStatusLine, CannotSendRequest,
ImportError: cannot import name HTTPSConnection
I've tried installing httpstream but that didn't fix the import error.
HTTPSConnection should come with the standard library and isn't part of py2neo itself:
https://docs.python.org/2/library/httplib.html#httplib.HTTPSConnection
I don't know specifically about how RedHat package Python but it's possible you need to install SSL support in addition to the main language. I believe this is a separate compilation option:
http://www.webtop.com.au/blog/compiling-python-with-ssl-support-fedora-10-2009020237
While trying to make attempt of installing it i get following error. What am I missing?
Install packages failed: Error occurred when installing package Flask-SQLAlchemy.
The following command was executed:
packaging_tool.py install --build-dir /private/var/folders/4B/4Bd6e77uH-uNGxBS-xhds++++TI/-Tmp-/pycharm-packaging5175396548329498703.tmp Flask-SQLAlchemy
The error output of the command:
Error: Traceback (most recent call last):
File "/Applications/PyCharm.app/helpers/packaging_tool.py", line 54, in do_install
import pip
File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/__init__.py", line 10, in <module>
from pip.util import get_installed_distributions, get_prog
File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/util.py", line 18, in <module>
from pip._vendor.distlib import version
File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/_vendor/distlib/version.py", line 14, in <module>
from .compat import string_types
File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/_vendor/distlib/compat.py", line 31, in <module>
from urllib2 import (Request, urlopen, URLError, HTTPError,
ImportError: cannot import name HTTPSHandler
Here is the SO question got several answers Python ImportError: cannot import name HTTPSHandler.
Which in general, check if you have ssl module, and OpenSSL header files installed.