I search on google how to add OpenSSL in python. The command is easy to run.
pip install pyOpenSSL or pip3 install pyOpenSSL. I don't know if my OpenSSL is already installed. I have this response when I installed openssl.
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Requirement already satisfied: pyopenssl in /usr/local/lib/python3.9/site-packages (20.0.1)
Requirement already satisfied: cryptography>=3.2 in /usr/local/lib/python3.9/site-packages (from pyopenssl) (36.0.1)
Requirement already satisfied: six>=1.5.2 in /usr/local/lib/python3.9/site-packages (from pyopenssl) (1.16.0)
Requirement already satisfied: cffi>=1.12 in /usr/local/lib/python3.9/site-packages (from cryptography>=3.2->pyopenssl) (1.15.0)
Requirement already satisfied: pycparser in /usr/local/lib/python3.9/site-packages (from cffi>=1.12->cryptography>=3.2->pyopenssl) (2.21)
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
this is my index.py code
import base64
import json
import requests
from OpenSSL import crypto
when I run this command python3 index.py. I always get this error
ModuleNotFoundError: No module named 'OpenSSL'
May i know what's the issue in my setup? Im new in python code. My python version is 3.10.0
It looks like you have pyopenssl installed for a Python 3.9 installation (look at the path: /usr/local/lib/python3.9), but you are trying to run with a Python 3.10 installation.
Use the pip from your Python 3.10 installation to install the required packages. python3 -m pip install pyOpenSSL should do that, regardless of what the standalone pip command resolves to.
I am trying to use PyCharm for my python 3 coding on my Linux, and it works great 90% of the time, but I notice that on occasion I cannot import certain packages. For example, when I click Settings->Project->Python Interpreter and try to install 'opencv-python', I get this error:
AttributeError: module 'setuptools.build_meta' has no attribute '__legacy__'
When I try to install opencv-python with pip I get this message:
$ pip install opencv-python
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: opencv-python in ./.local/lib/python3.6/site-packages (4.5.1.48)
Requirement already satisfied: numpy>=1.13.3 in ./.local/lib/python3.6/site-packages (from opencv-python) (1.19.2)
There seems to be some discrepency between the packages my computer has installed and the packages that PyCharm has installed. How can I solve this problem?
I'm having trouble installing PyTorch.
C:\Users\myself>pip install torch
Collecting torch
Using cached torch-1.7.1-cp38-cp38-win_amd64.whl (184.0 MB)
Requirement already satisfied: numpy in c:\users\myself\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from torch) (1.19.1)
Requirement already satisfied: typing-extensions in c:\users\myself\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from torch) (3.7.4.3)
Installing collected packages: torch
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\\Users\\myself\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python38\\site-packages\\caffe2\\python\\serialized_test\\data\\operator_test\\learning_rate_adaption_op_test.test_learning_rate_adaption_op_normalization.zip'
WARNING: You are using pip version 20.2.4; however, version 20.3.3 is available.
You should consider upgrading via the 'C:\Users\myself\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe -m pip install --upgrade pip' command.
It says that I'm missing a file in caffe2, but I'm not sure how I can get that file back.
Torch wheel contains caffe2 directory.
1.Try --no-cache-dir option
pip install --no-cache-dir torch
2. Removing the MAX_PATH Limitation
See here 3. Using Python on Windows — Python 3.7.9 documentation. You can find some more detailed discussion here.
This question already has answers here:
python spyder conda install failure
(2 answers)
Why does "pip install" inside Python raise a SyntaxError?
(7 answers)
Closed 5 years ago.
I am installing Scrapy in Python 3.5. I am referring to the installation guide here .
I have installed pip and conda. I tried both ways mentioned in the guide, but am getting this error:
I have already installed pip and minoconda:
conda install -c scrapinghub scrapy
and
pip install Scrapy
What is wrong with the installation?
You're trying to install scrapy in the python interpreter, you should install the package in your terminal. What's more, one requirement of installing scrapy is python 2.7, you're using python 3.5
Update:
Good news: Python 3 is Coming to Scrapy, you can try pip install scrapy==1.1.0rc1 now. Note that there are still some limitations, but won't be long that scrapy will have full of 3.x support. Pay close attention to the scrapy development ;)
Scrapy doesn't work with Python 3. At the moment, scrapy works only with Python 2.7.
You can pip install scrapy on python 3.5+, you just have to pip install all the deppendencies first - from here https://docs.scrapy.org/en/latest/intro/install.html
pip install lxml
pip install parsel
pip install w3lib
pip install twisted
pip install cryptography
pip install cryptography
pip install pyOpenSSL
and finally
pip install scrapy - worked for me
Before installing Scrapy on Python 3.5 on Windows 10 in virtualenv
Install lxml,PyDispatcher then simpy install Scrapy code is attached.
(pymote_env) C:\Users\DDSHARMA\Documents\pymote_env>pip install PyDispatcher
Collecting PyDispatcher
Installing collected packages: PyDispatcher
Successfully installed PyDispatcher-2.0.5
(pymote_env) C:\Users\DDSHARMA\Documents\pymote_env>pip install Scrapy
Collecting Scrapy
Using cached Scrapy-1.2.1-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): six>=1.5.2 in c:\users\ddsharma\documents\pymote_env\lib\site-packages (from Scrapy)
Collecting service-identity (from Scrapy)
Using cached service_identity-16.0.0-py2.py3-none-any.whl
Collecting Twisted>=10.0.0 (from Scrapy)
Using cached Twisted-16.4.1.tar.bz2
Collecting parsel>=0.9.3 (from Scrapy)
Using cached parsel-1.0.3-py2.py3-none-any.whl
Collecting pyOpenSSL (from Scrapy)
Using cached pyOpenSSL-16.2.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): PyDispatcher>=2.0.5 in c:\users\ddsharma\documents\pymote_env\lib\site-packages (from Scrapy)
Requirement already satisfied (use --upgrade to upgrade): lxml in c:\users\ddsharma\documents\pymote_env\lib\site-packages (from Scrapy)
Collecting queuelib (from Scrapy)
Using cached queuelib-1.4.2-py2.py3-none-any.whl
Collecting w3lib>=1.15.0 (from Scrapy)
Using cached w3lib-1.15.0-py2.py3-none-any.whl
Collecting cssselect>=0.9 (from Scrapy)
Using cached cssselect-1.0.0-py2.py3-none-any.whl
Collecting pyasn1-modules (from service-identity->Scrapy)
Using cached pyasn1_modules-0.0.8-py2.py3-none-any.whl
Collecting pyasn1 (from service-identity->Scrapy)
Using cached pyasn1-0.1.9-py2.py3-none-any.whl
Collecting attrs (from service-identity->Scrapy)
Using cached attrs-16.2.0-py2.py3-none-any.whl
Collecting zope.interface>=4.0.2 (from Twisted>=10.0.0->Scrapy)
Using cached zope.interface-4.3.2-cp35-cp35m-win32.whl
Collecting cryptography>=1.3.4 (from pyOpenSSL->Scrapy)
Using cached cryptography-1.5.2-cp35-cp35m-win32.whl
Requirement already satisfied (use --upgrade to upgrade): setuptools in c:\users\ddsharma\documents\pymote_env\lib\site-packages (from zope.interface>=4.0.2->Twisted>=10.0.0->Scrapy)
Collecting idna>=2.0 (from cryptography>=1.3.4->pyOpenSSL->Scrapy)
Using cached idna-2.1-py2.py3-none-any.whl
Collecting cffi>=1.4.1 (from cryptography>=1.3.4->pyOpenSSL->Scrapy)
Using cached cffi-1.8.3-cp35-cp35m-win32.whl
Collecting pycparser (from cffi>=1.4.1->cryptography>=1.3.4->pyOpenSSL->Scrapy)
Downloading pycparser-2.16.tar.gz (230kB)
100% |################################| 235kB 286kB/s
Building wheels for collected packages: Twisted, pycparser
Running setup.py bdist_wheel for Twisted ... done
Stored in directory: C:\Users\DDSHARMA\AppData\Local\pip\Cache\wheels\0e\53\62\e7b4cea7df9113fb2818b224eb5d143be981568d9c43057a0a
Running setup.py bdist_wheel for pycparser ... done
Stored in directory: C:\Users\DDSHARMA\AppData\Local\pip\Cache\wheels\34\cc\b5\34e805b130a9227f0681d5517cf554d950bb0361c3a373496f
Successfully built Twisted pycparser
Installing collected packages: pyasn1, pyasn1-modules, idna, pycparser, cffi, cryptography, pyOpenSSL, attrs, service-identity, zope.interface, Twisted, w3lib, cssselect, parsel, queuelib, Scrapy
Successfully installed Scrapy-1.2.1 Twisted-16.4.1 attrs-16.2.0 cffi-1.8.3 cryptography-1.5.2 cssselect-1.0.0 idna-2.1 parsel-1.0.3 pyOpenSSL-16.2.0 pyasn1-0.1.9 pyasn1-modules-0.0.8 pycparser-2.16 queuelib-1.4.2 service-identity-16.0.0 w3lib-1.15.0 zope.interface-4.3.2
(pymote_env) C:\Users\DDSHARMA\Documents\pymote_env>
I was able to install scrapy on Python 3.5.
Check to see if you are able to install these Twisted, lxml and pyOpenSSL.
In my case I got error in installing lxml. I fixed it by downloading lxml‑3.6.4‑cp35‑cp35m‑win_amd64.whl from http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml based on your Python and windows version. (Credit to Christoph Gohlke's generosity for sharing this library.). Installed it using the following command:
pip install lxml‑3.6.4‑cp35‑cp35m‑win_amd64.whl
I am getting the following errors when run pip install livewires:
Collecting livewires
Using cached LiveWires-2.1.tar.gz
Collecting pygame (from livewires)
Could not find a version that satisfies the requirement pygame (from livewires) (from versions: )
No matching distribution found for pygame (from livewires)
I am in Mac with python 2.7.10, and this package can not be installed through my editor (Pycharm) neither.
Using cached LiveWires-2.1.tar.gz
Maybe there is a problem with the cached version. Try using the --no-cache-dir flag to force a fresh download.
pip install --no-cache-dir livewires