facing OSError: [Errno 50] Protocol not available on windows 11, python
the solution I found/ I can reach is using this, but is ubuntu version
sudo apt-get -o Dpkg::Options::="--force-confmiss" install --reinstall netbase
I tried winget -o Dpkg::Options::="--force-confmiss" install --reinstall netbase in windows cmd is still not work
Question: how to deal with OSError: [Errno 50] Protocol not available in windows 11
Related
I need to install pycurl in order to run a python script, but I can't find the way to do it on macOS.
I have already tried brew, update Pip but I always receive this error after did "pip install pycurl"
Collecting pycurl
Using cached https://files.pythonhosted.org/packages/e8/e4/0dbb8735407189f00b33d84122b9be52c790c7c3b25286826f4e1bdb7bde/pycurl-7.43.0.2.tar.gz
Complete output from command python setup.py egg_info:
Using curl-config (libcurl 7.54.0)
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/vk/f193293d0pvd2ynlcpnyx9100000gn/T/pip-install-rxidIQ/pycurl/setup.py", line 913, in <module>
ext = get_extension(sys.argv, split_extension_source=split_extension_source)
File "/private/var/folders/vk/f193293d0pvd2ynlcpnyx9100000gn/T/pip-install-rxidIQ/pycurl/setup.py", line 582, in get_extension
ext_config = ExtensionConfiguration(argv)
File "/private/var/folders/vk/f193293d0pvd2ynlcpnyx9100000gn/T/pip-install-rxidIQ/pycurl/setup.py", line 99, in __init__
self.configure()
File "/private/var/folders/vk/f193293d0pvd2ynlcpnyx9100000gn/T/pip-install-rxidIQ/pycurl/setup.py", line 316, in configure_unix
specify the SSL backend manually.''')
__main__.ConfigurationError: Curl is configured to use SSL, but we have not been able to determine which SSL backend it is using. Please see PycURL documentation for how to specify the SSL backend manually.
Any suggestion ?
Recent versions of curl support multiple ssl backend and pycurl is not able to decide which one is used during the installation time. This is a known problem (https://github.com/pycurl/pycurl/issues/530) in 7.43.0.2. Lots of people say to install curl with openssl support, but on macos is better to use the default SecureTransport and let the system access the keychain instead of using the bundled certificates in openssl.
Try installing 7.43.0.1 to fix your problems.
pip install pycurl==7.43.0.1
If this doesn't work execute this:
brew link curl
export LDFLAGS="-L/usr/local/opt/curl/lib"
export CPPFLAGS="-I/usr/local/opt/curl/include"
and try again
pip install pycurl==7.43.0.1
In order for PycURL to find the OpenSSL headers on macOS, we need to specify which SSL backend to use and where OpenSSL can be found:
pip install --install-option="--with-openssl" --install-option="--openssl-dir=/usr/local/opt/openssl" pycurl
That OpenSSL path will vary based on your installation. On Apple Silicon, this should work:
pip install --install-option="--with-openssl" --install-option="--openssl-dir=/opt/homebrew/opt/openssl" pycurl
I have a vagrant Ubuntu 16.04 VM with Ansible installed (using sudo apt install ansible) i config the /etc/ansible/hosts file and when i try to run ansible all -m ping i get this error:
Traceback (most recent call last):
File "/usr/bin/ansible", line 85, in <module>
sys.exit(cli.run())
File "/usr/lib/python2.7/dist-packages/ansible/cli/adhoc.py", line 190, in run
self._tqm.cleanup()
File "/usr/lib/python2.7/dist-packages/ansible/executor/task_queue_manager.py", line 245, in cleanup
self._cleanup_processes()
File "/usr/lib/python2.7/dist-packages/ansible/executor/task_queue_manager.py", line 249, in _cleanup_processes
self._result_prc.terminate()
File "/usr/lib/python2.7/dist-packages/ansible/executor/process/result.py", line 89, in terminate
super(ResultProcess, self).terminate()
File "/usr/lib/python2.7/multiprocessing/process.py", line 137, in terminate
self._popen.terminate()
AttributeError: 'NoneType' object has no attribute 'terminate'
I tried the same installations and config file on a Vagrant Centos7 image and everything works fine.
I was not able to find something similar but maybe my search skills are not so good. Does anyone encounter this? Is there something else to install on Ubuntu?
Thank you.
I have found a solution for the Ubuntu version. Don't install it by using sudo apt install ansible only, you need to install it from the ansible repo.
Run this:
sudo apt-add-repository ppa:ansible/ansible
sudo apt update
sudo apt install ansible -y
I don't know why it works like this, I don't have time to research it but it works using the ppa:ansible/ansible. I guess the one from the apt is obsolete.
PS: thanks for the downvote whoever downvoted.
trying to install wxPython using pip install -U wxPython.
I get the below error,
PermissionError: [Errno 13] Permission denied: 'c:\program files\python36\Lib\site-packages\six.py'
I've searched everywhere for a solution. I have changed the Python36 dir security for complete read/write. At a loss on what to do.
After I have upgraded to El Capitan, Python 2.7 is unable to install/ upgrade/ uninstall some packages, but meanwhile, it still works fine for some other packages.
Below (the end) is the error message I have got when trying to upgrade numpy. Same error also raises when I tried to uninstall it.
I have tried pip install --user or pip install --ignore-installed numpy, but neither works. Even if it says numpy has been successfully installed, the version remains unchanged and it does not really upgrade.
I know other solutions may be reinstall python using brew, but I want to avoid multiple versions of Python if possible. Any help would be appreciated.
----------- Error Message -----------
40:523: execution error: The directory '/Users/-/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
DEPRECATION: Uninstalling a distutils installed project (numpy) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 211, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 311, in run
root=options.root_path,
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 640, in install
requirement.uninstall(auto_confirm=True)
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 716, in uninstall
paths_to_remove.remove(auto_confirm)
File "/Library/Python/2.7/site-packages/pip/req/req_uninstall.py", line 125, in remove
renames(path, new_path)
File "/Library/Python/2.7/site-packages/pip/utils/init.py", line 315, in renames
shutil.move(old, new)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move
copy2(src, real_dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2
copystat(src, dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat
os.chflags(dst, st.st_flags)
OSError: [Errno 1] Operation not permitted: '/var/folders/m0/hzt3nk9d43n05bwm6zztqjkh0000gn/T/pip-HESb5m-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy-1.8.0rc1-py2.7.egg-info'
(2)
The python framework you are using
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7"
is the system python that comes with your mac os. You shouldn't pip install packages as doing so may pollute your system python and potentially cause system problems. This is why other solutions suggest installing another python such as from brew brew install python#2.
The issue you are running into after upgrading to el capitan is the System Integrity Protection built-in OS X El Capitan and later
You can disable this protection by following the steps described here:
https://www.macworld.com/article/2986118/security/how-to-modify-system-integrity-protection-in-el-capitan.html
After doing so, you will be able to install and upgrade packages using pip.
I do not recommend this, but it will work!
I suggest installing python using brew and then setup a virtual environment using pip such that you can install python packages that won’t pollute the global python.
pip install virtualenv
pip install virtualenvwrapper
I'm very new to Python and using the terminal, and I'm having a lot of trouble downloading wxpython. I'm using Mac OS X Lion, the most recent version, and I've tried two methods:
If I try to simply download wxpython off their website, I go through the entire installation process and it says it's been installed but then I can't find it on my computer. And when I go to run the separately installed demo, it says that there's no module named wxpython on my computer.
So I turned to other methods...
If I try sudo pip install wxpython, I get:
Downloading/unpacking wxpython
Downloading wxPython2.8-win64-devel-2.8.12.1-msvc9x64.tar.bz2 (7.2Mb): 7.2Mb downloaded
Running setup.py egg_info for package wxpython
Traceback (most recent call last):
File "<string>", line 14, in <module>
IOError: [Errno 2] No such file or directory: '/Users/michelletyler1/build/wxpython/setup.py'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 14, in <module>
IOError: [Errno 2] No such file or directory: '/Users/michelletyler1/build/wxpython/setup.py'
I also tried sudo port install py27-wxpython after installing MacPorts, and got:
---> Computing dependencies for py27-wxpython
---> Building py27-wxpython
Error: org.macports.build for port py27-wxpython returned: command execution failed
Please see the log file for port py27-wxpython for details:
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-wxpython/py27-wxpython/main.log
To report a bug, follow the instructions in the guide:
http://guide.macports.org/#project.tickets
Error: Processing of port py27-wxpython failed
What can be wrong?
Also, I've been trying to figure out how to change my $PATH so that /usr/local/bin is ahead of /usr/bin (as advised by brew doctor), but when I go to edit my ~/.profile (what I've gathered I'm supposed to do from what I've found online so far), it doesn't work.
Thanks for the help!
From what I understand, you don't want to install wxPython against the preinstalled Python. Instead, you need to go to www.python.org and install a fresh Mac compatible Python. Then you can download the wxPython you want and install it against your fresh Python. By the way, wxPython does not support easy_install or pip.