pypy3's pip can't install jupyter - pip

When I use pypy3's pip to install jupyter, it doesn't work always.
pip install jupyter
The pypy version I use is pypy3.7-v7.3.3-win32.
When installing the jupyter, it always throws the AttributeError, like this:
Collecting nbclient<0.6.0,>=0.5.0
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/fd/4f/5cbd9bdb30bfaad620f028711bf232b9cec8fdff1dcf68d9259254fcddeb/nbclient-0.5.1-py3-none-any.whl (65 kB)
ERROR: Exception:
Traceback (most recent call last):
File "d:\myapps\pypy37\site-packages\pip\_internal\cli\base_command.py", line 224, in _main
status = self.run(options, args)
File "d:\myapps\pypy37\site-packages\pip\_internal\cli\req_command.py", line 180, in wrapper
return func(self, options, args)
File "d:\myapps\pypy37\site-packages\pip\_internal\commands\install.py", line 321, in run
reqs, check_supported_wheels=not options.target_dir
File "d:\myapps\pypy37\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 122, in resolve
requirements, max_rounds=try_to_avoid_resolution_too_deep,
File "d:\myapps\pypy37\site-packages\pip\_vendor\resolvelib\resolvers.py", line 445, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "d:\myapps\pypy37\site-packages\pip\_vendor\resolvelib\resolvers.py", line 344, in resolve
success = self._backtrack()
File "d:\myapps\pypy37\site-packages\pip\_vendor\resolvelib\resolvers.py", line 287, in _backtrack
criterion = self.state.criteria[name].excluded_of([candidate])
AttributeError: 'NoneType' object has no attribute 'excluded_of'
How can I solve this problem?

You can get complete details here. It seems your commandline is not correct. Please follow any of the desired from link below. Jupyter notebook installation

Related

How can I uninstall pip on Mac (Issue)?

I am trying to fix pip but I'm in a state where it's installed but also not installed?
When I type "pip" in terminal, I get that pip is not installed.
When I type "pip3" in the terminal, I get the following:
Traceback (most recent call last):
File "/Applications/Xcode.app/Contents/Developer/usr/bin/pip3", line 5, in <module>
from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip'
How do I get rid of pip?
I also tried to run "python3 get-pip.py" again (download again), but I got the following error:
ERROR: Exception:
Traceback (most recent call last):
File "/var/folders/bh/gw4lmfss1w7gkzxnv7vdftbw0000gn/T/tmpgvtrdkgq/pip.zip/pip/_internal/cli/base_command.py", line 160, in exc_logging_wrapper
status = run_func(*args)
^^^^^^^^^^^^^^^
File "/var/folders/bh/gw4lmfss1w7gkzxnv7vdftbw0000gn/T/tmpgvtrdkgq/pip.zip/pip/_internal/cli/req_command.py", line 247, in wrapper
return func(self, options, args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/folders/bh/gw4lmfss1w7gkzxnv7vdftbw0000gn/T/tmpgvtrdkgq/pip.zip/pip/_internal/commands/install.py", line 553, in run
self._handle_target_dir(
File "/var/folders/bh/gw4lmfss1w7gkzxnv7vdftbw0000gn/T/tmpgvtrdkgq/pip.zip/pip/_internal/commands/install.py", line 608, in _handle_target_dir
shutil.rmtree(target_item_dir)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/shutil.py", line 732, in rmtree
_rmtree_safe_fd(fd, path, onerror)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/shutil.py", line 660, in _rmtree_safe_fd
_rmtree_safe_fd(dirfd, fullname, onerror)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/shutil.py", line 683, in _rmtree_safe_fd
onerror(os.unlink, fullname, sys.exc_info())
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/shutil.py", line 681, in _rmtree_safe_fd
os.unlink(entry.name, dir_fd=topfd)
PermissionError: [Errno 13] Permission denied: 'configuration.py'
Try this
python -m pip uninstall [options] <package>
python -m pip uninstall [options] -r <requirements file>
For Example
python -m pip uninstall simplejson
Reference

Unable to open jupyter notebook using pip on windows

C:\Users\user>jupyter notebook
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 197, in run_module_as_main
return run_code(code, main_globals, None,
File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\user\AppData\Local\Programs\Python\Python310\Scripts\jupyter-notebook.EXE_main.py", line 4, in
File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\notebook\notebookapp.py", line 47, in
from zmq.eventloop import ioloop
File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\zmq_init.py", line 125, in
from zmq import backend
File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\zmq\backend_init.py", line 32, in
raise original_error from None
File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\zmq\backend_init_.py", line 27, in
_ns = select_backend(first)
File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\zmq\backend\select.py", line 36, in select_backend
raise ImportError(f"Importing {name} failed with {e}") from e
ImportError: Importing zmq.backend.cython failed with builtins.type size changed, may indicate binary incompatibility. Expected 888 from C header, got 880 from PyObject
I had the same problem and was able to rectify it by uninstalling the Jupyter notebook version that didn't work for me(5.0, 4.8) and installing a version that did work (4.0). I couldn't find this exact problem online but similar problems have occurred with NumPy module installations also fixed with a different version installation.
try:
pip uninstall notebook
pip install notebook==4.0

Conda info (and other operations) not working

I am trying to install geopandas and have therefore downloaded anaconda. However the anaconda prompt gives back an error when I try the command "conda install geopandas" (Installing geopandas with anaconda prompt causes ImportError). I discovered that conda won't install any package, nor will it create new environments. And, as it happens, will not even work for "conda info" (see below error report).
Looking through help suggestions on the internet I added both "C:\Users\Name\anaconda3" and "C:\Users\Name\anaconda3\Scripts" to the PATH System environment variable but it didn't resolve the issue.
Any help would be greatly appreciated.
>>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "C:\Users\Francesco\anaconda3\lib\site-packages\conda\exceptions.py", line 1079, in __call__
return func(*args, **kwargs)
File "C:\Users\Francesco\anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _main
exit_code = do_call(args, p)
File "C:\Users\Francesco\anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 83, in do_call
return getattr(module, func_name)(args, parser)
File "C:\Users\Francesco\anaconda3\lib\site-packages\conda\cli\main_info.py", line 316, in execute
info_dict = get_info_dict(args.system)
File "C:\Users\Francesco\anaconda3\lib\site-packages\conda\cli\main_info.py", line 164, in get_info_dict
pkgs_dirs=context.pkgs_dirs,
File "C:\Users\Francesco\anaconda3\lib\site-packages\conda\base\context.py", line 520, in pkgs_dirs
fixed_dirs += user_data_dir(APP_NAME, APP_NAME),
File "C:\Users\Francesco\anaconda3\lib\site-packages\conda\_vendor\appdirs.py", line 67, in user_data_dir
path = os.path.join(_get_win_folder(const), appauthor, appname)
File "C:\Users\Francesco\anaconda3\lib\site-packages\conda\_vendor\appdirs.py", line 284, in _get_win_folder_with_pywin32
from win32com.shell import shellcon, shell
ImportError: DLL load failed while importing shell: The specified module could not be found.
$ C:\Users\Francesco\anaconda3\Scripts\conda-script.py info
'''
I've experienced pretty much the same problem. I was able to narrow down the issue to pywin32 version 302.
Using version 301 worked for me.
Try: pip install pywin32==301 --force
See https://github.com/mhammond/pywin32/issues/1783

Unable to install lxml on OSX using pip: 550 Failed to change directory

I'm trying to install lxml on OSX El Capitan using pip3; lots of googling turned up using STATIC_DEPS, but unfortunately I'm now getting an error that to me seems to imply a missing file in the package:
$ STATIC_DEPS=true pip3 install lxml
Collecting lxml
Using cached https://files.pythonhosted.org/packages/54/a6/43be8cf1cc23e3fa208cab04ba2f9c3b7af0233aab32af6b5089122b44cd/lxml-4.2.3.tar.gz
Complete output from command python setup.py egg_info:
Building lxml version 4.2.3.
Latest version of zlib is 1.2.11
Downloading zlib into libs/zlib-1.2.11.tar.gz from http://zlib.net/zlib-1.2.11.tar.gz
Unpacking zlib-1.2.11.tar.gz into build/tmp
Latest version of libiconv is 1.15
Downloading libiconv into libs/libiconv-1.15.tar.gz from ftp://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz
Unpacking libiconv-1.15.tar.gz into build/tmp
Latest version of libxml2 is 2.9.8
Downloading libxml2 into libs/libxml2-2.9.8.tar.gz from ftp://xmlsoft.org/libxml2/libxml2-2.9.8.tar.gz
Unpacking libxml2-2.9.8.tar.gz into build/tmp
Latest version of libxslt is 1.1.33
Downloading libxslt into libs/libxslt-1.1.33.tar.gz from ftp://xmlsoft.org/libxml2/libxslt-1.1.33.tar.gz
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 2417, in retrfile
self.ftp.cwd(file)
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ftplib.py", line 631, in cwd
return self.voidcmd(cmd)
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ftplib.py", line 278, in voidcmd
return self.voidresp()
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ftplib.py", line 251, in voidresp
resp = self.getresp()
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ftplib.py", line 246, in getresp
raise error_perm(resp)
ftplib.error_perm: 550 Failed to change directory.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1540, in ftp_open
fp, retrlen = fw.retrfile(file, type)
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 2419, in retrfile
raise URLError('ftp error: %r' % reason) from reason
urllib.error.URLError: <urlopen error ftp error: error_perm('550 Failed to change directory.')>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/hp/_4p52dfd7s9cf49p86sg1l_w0000gp/T/pip-install-yjxema7x/lxml/setup.py", line 241, in <module>
**setup_extra_options()
File "/private/var/folders/hp/_4p52dfd7s9cf49p86sg1l_w0000gp/T/pip-install-yjxema7x/lxml/setup.py", line 150, in setup_extra_options
STATIC_CFLAGS, STATIC_BINARIES)
File "/private/var/folders/hp/_4p52dfd7s9cf49p86sg1l_w0000gp/T/pip-install-yjxema7x/lxml/setupinfo.py", line 75, in ext_modules
multicore=OPTION_MULTICORE)
File "/private/var/folders/hp/_4p52dfd7s9cf49p86sg1l_w0000gp/T/pip-install-yjxema7x/lxml/buildlibxml.py", line 390, in build_libxml2xslt
libxslt_dir = unpack_tarball(download_libxslt(download_dir, libxslt_version), build_dir)
File "/private/var/folders/hp/_4p52dfd7s9cf49p86sg1l_w0000gp/T/pip-install-yjxema7x/lxml/buildlibxml.py", line 218, in download_libxslt
version_re, filename, version=version)
File "/private/var/folders/hp/_4p52dfd7s9cf49p86sg1l_w0000gp/T/pip-install-yjxema7x/lxml/buildlibxml.py", line 291, in download_library
urlretrieve(full_url, dest_filename)
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 247, in urlretrieve
with contextlib.closing(urlopen(url, data)) as fp:
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 543, in _open
'_open', req)
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1551, in ftp_open
raise exc.with_traceback(sys.exc_info()[2])
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1540, in ftp_open
fp, retrlen = fw.retrfile(file, type)
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 2419, in retrfile
raise URLError('ftp error: %r' % reason) from reason
urllib.error.URLError: <urlopen error ftp error: URLError("ftp error: error_perm('550 Failed to change directory.')")>
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/hp/_4p52dfd7s9cf49p86sg1l_w0000gp/T/pip-install-yjxema7x/lxml/
As the command failed on Downloading libxslt into libs/libxslt-1.1.33.tar.gz from ftp://xmlsoft.org/libxml2/libxslt-1.1.33.tar.gz
I browsed the ftp://xmlsoft.org/libxml2/ site which doesn't have ftp://xmlsoft.org/libxml2/libxslt-1.1.33.tar.gz, only ftp://xmlsoft.org/libxml2/libxslt-1.1.33-rc1.tar.gz.
Is this the problem, and if so is there a way to override it in the package? Or am I missing something?
You can bypass FTP errors while still having the STATIC_DEPS functionality by downloading libxml2 and libxslt manually and building from setup.py.
Pasted from the lxml website:
...If you want to use
specific versions, or want to prevent any online access, you can
download both tar.gz release files yourself, place them into a
subdirectory libs in the lxml distribution, and call setup.py with the
desired target versions like this:
python setup.py build --static-deps \
--libxml2-version=2.9.1 \
--libxslt-version=1.1.28 \
sudo python setup.py install

Error while installing Fabric on OSX using recommended pip. Xcode is latest version

I just tried to install Fabric on my Mac, and I was thrown this error after using pip install fabric
Installing collected packages: fabric, paramiko, pycrypto, ecdsa
Cleaning up...
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip-1.5-py2.7.egg/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip-1.5-py2.7.egg/pip/commands/install.py", line 275, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "/Library/Python/2.7/site-packages/pip-1.5-py2.7.egg/pip/req.py", line 1371, in install
requirement.install(install_options, global_options, *args, **kwargs)
File "/Library/Python/2.7/site-packages/pip-1.5-py2.7.egg/pip/req.py", line 655, in install
self.move_wheel_files(self.source_dir, root=root)
File "/Library/Python/2.7/site-packages/pip-1.5-py2.7.egg/pip/req.py", line 885, in move_wheel_files
pycompile=self.pycompile,
File "/Library/Python/2.7/site-packages/pip-1.5-py2.7.egg/pip/wheel.py", line 209, in move_wheel_files
clobber(source, lib_dir, True)
File "/Library/Python/2.7/site-packages/pip-1.5-py2.7.egg/pip/wheel.py", line 196, in clobber
os.makedirs(destsubdir)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/fabfile'
Storing debug log for failure in /Users/michaelsnowden/Library/Logs/pip.log
Here is the entire debug log
What does this mean, and why am I getting this error?
For a system wide pip install you need to do a sudo:
sudo pip install fabric
Since the system wide packages are available globally, they are written outside paths that have write permission for a normal user. In that case you need to do a sudo other permission to write to those folders would be denied to you.
When installed globally, you can invoke the Python interpreter anywhere in your system and import fabric would be available to you. Also, it would be available to any user of your system.

Resources