can't install pip module smtpd-tls - python-3.x

I am trying to set up a debugging server for testing email logging and I encountered an issue with smtpd module. It was not installed and I can not pip install with with cli or add the package in Pycharm ui. From my understanding of the error it thinks my python version is less than 2.7 but I have confirmed that for this venv I am in 3.7.0. I cannot view the install log because it is a temp file and whe I go to that directory there is no such file.
Any ideas?

This is a known bug in smtpd-tls. Unless you can get the author to update the package, you cannot install smtpd-tls in Python 3.

Related

Spyder, clean Win installation, ver. 4.2.3 - pip gives message "No module named pip"

I have Spyder, clean Win10 installation, ver. 4.2.3.
When I run command pip, it gives message:
Note: you may need to restart the kernel to use updated packages.
C:\Users\UserName\AppData\Local\Programs\Spyder\Python\python.exe: No module named pip
I restarted Spyder, Win10, nothing helps.
How to fix it?
Thanks.
(Spyder maintainer here) We don't provide pip in our Windows app to prevent people breaking Spyder by installing any kind of packages with it.
The best way to use other packages that don't come with our app is to install Miniconda, create a conda environment after that with the packages you want to use and spyder-kernels, and finally connect Spyder to that env.
If you have python 3.4+ then pip should be installed with python.
To check that, you can run
pip help
in your windows command line.
However, if it isn't the case then download the get-pip.py file and run
python get-pip.py
and the pip installation should start. You can use pip help to verify this.
Another source of the problem might be that pip isn't listed in your PATH variables and thus isn't recognized by your command line.

installation of custom library cdata for python

I would like to install custom library cdata for python. This library enables connection over C4C Hybris.
Unfortunately, system generates the following error while pip list (of anaconda) shows this library installed :
error image
cdata library is installed in anaconda
Faced the same problem while installing a different package, must be because of 2 different versions of python installed in your system. One solution is -
Uninstall Python from Control Panel
Uninstall Pycharm
Reinstall the latest version of both.
Better solution is changing the interpreter for that, you should go to Pycharm --> file> settings> project>project interpreter.
If there is another Python Instance, it should be up there, change it to that one. If its not in the list, click on the button that looks like Asterik/star (next to project interpreter).
CHange the interpreter.
conda update conda
python -m pip install --upgrade pip
No errors will be observed thereafter.
Moreover, read about Anaconda Virtual Envs, it will help you in long tun.

How to fix EnvironmentError when installing modules using pip?

When trying to install requests or literally anything using pip it'll collect the option and then give me this ERROR every time. I can't use pip to install anything.
C:\Users\evand>pip3 install requests
Collecting requests
ERROR: Could not install packages due to an EnvironmentError: Could not find a suitable TLS CA certificate bundle, invalid path: path/to/ca-bundle.crt
Version of pip:
C:\Users\evand>pip --version
pip 19.2.3 from c:\users\evand\appdata\local\programs\python\python38-32\lib\site-packages\pip (python 3.8)
Version of Python:
C:\Users\evand>py --version
Python 3.8.3
Current Environment Variables (If this is related at all)
I have also tried the 'Repair' option using the Python Installer as well as uninstalling then reinstalling as a custom installation with 'Add to PATH' and the other options. That didn't fix the issue, so I deleted pip along with every module installed on my computer then reinstalled pip. Nada. At this point, I can no longer program with this computer because I cannot import any module in any of my scripts. I am not sure why this issue suddenly arose. Help would be very much appreciated.
This worked for me:
Uninstalling the pip configuration file in %appdata%/pip/ then 'modifying' python using the python launcher.

Socketio installing problems

I'm facing a problem with socketio. I imported it into my programme by command:
import socketio
Wen I typped pip freeze I got:
python-socketio==4.5.1
Then I ran programme by typing into console:
myfile.py --mode "mode"
But it says:
ModuleNotFoundError: No module named 'socketio'
Any ideas how to fix it?
It happens when you have multiple version of pip install on your system.
you can deal with this problem by creating a virtual environment and again loading the socket-io library.
Install pipenv.
pip install pipenv
Then change directory to the folder containing your Python project and initiate Pipenv,
cd your_project
pipenv install
This will build two new files in your project directory, Pipfile and Pipfile.lock, and a new virtual environment for your project, if it doesn't already exist. If you add the —two or —three flags to the last command above, your project will be initialized with the use of Python 2 or 3. Otherwise, Python's default version will be included.
To install a Python package for your project use the install keyword. For example,
pipenv install beautifulsoup4
and for uninstalling
pipenv uninstall beautifulsoup4

PyCharm doesn't Splunk SDK (splunklib)

I have a simple python script that calls the Splunk API. For this, I include splunklib:
"import splunklib.client as client"
This script works very well, when I start it from a terminal window (MacOS): python3 main.py
For this, I had to install splunklib using "pip3 install splunklib".
Unfortunately I can't run the same script out of Pycharm.
I also successfully installed splunklib under settings/Project Interpreter/Package. splunklib is shown in the list of installed packages for the Project Interpreter (splunklib 1.0.0, Python 3.7).
When I run the script using Pycharm, I get the following error message:
import splunklib.client as client
ModuleNotFoundError: No module named 'splunklib.client'; 'splunklib' is not a package
Why can Pycharm not find Esplunklib, even though it's installed in the Project Interpreter?
I had this same issue today, and tried to resolve it the same as you by doing a pip3 install splunklib. Unfortunately, the splunklib package is not the one you want. I'm not sure if that is a deprecated package, or something else entirely, but what you're probably looking for is the splunk-sdk.
This should get you going; pip3 install splunk-sdk

Resources