-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pip 18.0 install fails with AttributeError: 'NoneType' object has no attribute 'bytes' #5820
Comments
PyCharm installs pip as an egg (see You need to raise this with JetBrains, or create your environments manually. I believe there's an existing issue about this on the PyCharm tracker (I raised one a couple of years ago, but haven't heard anything about it since - I stopped tracking it when I gave up using PyCharm because this issue was too much of a problem for me). |
try: |
I am having a similar problem (at least, the traceback is similar). I am using a fresh conda environment (most packages from conda-forge), pip 18.1, python 3.6, and linux. The force-reinstall command given does not solve my issue. I am utilizing the new PEP508 syntax for installing private packages from our internal gitlab server (anonymized below). I added some print statements that I hope will be helpful:
|
Ah, I didn't look closely enough at the tracebacks, shall I file a new bug report? |
@WeatherGod: that's not the same issue, check the discussion around this comment: #5571 (review). |
Ah, indeed, shall I add my traceback there? |
Better to open a new bug, so the issue can be properly tracked. |
Fix from @fingerman not working in my case. Installation is broken, any idea about what is going on ? |
Still happening. |
@fingerman Thanks. That worked instantly.
|
You might need the easy install, as it worked for me when upgrading my Pip |
@fingerman Thanks
works |
@fingerman having same error for force install. |
@fingerman having the same issue on pip 19.0.1, any other fix? Thanks |
I had the same but MichealAbaho from the above comment with the |
|
Same for me. |
easy_install -U pip |
ok, I just encounter the same issue but I have some basic info about this, the old pip is actually inside my manual remove old version of pip in my user install directory also works,
|
python -m pip install -U --force-reinstall pip |
"python -m pip install -U --force-reinstall pip" didn't work but "easy_install -U pip" does the trick for me. Thanks a lot. |
Nothing worked for me, I eventually installed a coexisting version of Python (3.7), and pip could be upgrdaed for that version. |
This shows where python is looking for python files. It can be useful when you try to troubleshoot python import errors |
THANK YOU! this damn problem has been bugging me for the past hour, would you mind how you came across this fantastic solution? i will go learn about wth an .egg is |
|
I use jupyter notebook with py3.6 on win10. The problem still exists when I upgrade pip from 19.0.3 to 19.1.1. Here is my sys.path:
However, easy_install -U pip did work. Thx! |
This seems to be the case for my error as well. |
Still happening while using Python 3.6, Windows 10, going from pip 10.0.1 to 19.1.1 python -m pip install -U --force-reinstall pip did fix it for me. |
thanks bro |
|
Closing since we have a resolution on this. |
Environment
Description
pip installs with a compile at runtime bug.
Expected behavior
pip installs without error.
How to Reproduce
https://www.python.org/ftp/python/3.7.1/python-3.7.1rc1-amd64.exe
Output
You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
(venv) C:\projects\nltk-tutorial>python -m pip install --upgrade pip
Collecting pip
Downloading https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl (1.3MB)
100% |████████████████████████████████| 1.3MB 5.8MB/s
Installing collected packages: pip
Found existing installation: pip 10.0.1
Uninstalling pip-10.0.1:
Successfully uninstalled pip-10.0.1
Rolling back uninstall of pip
Exception:
Traceback (most recent call last):
File "C:\projects\nltk-tutorial\venv\lib\site-packages\pip-10.0.1-py3.7.egg\pip_internal\basecommand.py", line 228, in main
status = self.run(options, args)
File "C:\projects\nltk-tutorial\venv\lib\site-packages\pip-10.0.1-py3.7.egg\pip_internal\commands\install.py", line 335, in run
use_user_site=options.use_user_site,
File "C:\projects\nltk-tutorial\venv\lib\site-packages\pip-10.0.1-py3.7.egg\pip_internal\req_init_.py", line 49, in install_given_reqs
**kwargs
File "C:\projects\nltk-tutorial\venv\lib\site-packages\pip-10.0.1-py3.7.egg\pip_internal\req\req_install.py", line 748, in install
use_user_site=use_user_site, pycompile=pycompile,
File "C:\projects\nltk-tutorial\venv\lib\site-packages\pip-10.0.1-py3.7.egg\pip_internal\req\req_install.py", line 961, in move_wheel_files
warn_script_location=warn_script_location,
File "C:\projects\nltk-tutorial\venv\lib\site-packages\pip-10.0.1-py3.7.egg\pip_internal\wheel.py", line 431, in move_wheel_files
generated.extend(maker.make(spec))
File "C:\projects\nltk-tutorial\venv\lib\site-packages\pip-10.0.1-py3.7.egg\pip_vendor\distlib\scripts.py", line 403, in make
self._make_script(entry, filenames, options=options)
File "C:\projects\nltk-tutorial\venv\lib\site-packages\pip-10.0.1-py3.7.egg\pip_vendor\distlib\scripts.py", line 307, in _make_script
self._write_script(scriptnames, shebang, script, filenames, ext)
File "C:\projects\nltk-tutorial\venv\lib\site-packages\pip-10.0.1-py3.7.egg\pip_vendor\distlib\scripts.py", line 243, in _write_script
launcher = self._get_launcher('t')
File "C:\projects\nltk-tutorial\venv\lib\site-packages\pip-10.0.1-py3.7.egg\pip_vendor\distlib\scripts.py", line 382, in _get_launcher
result = finder(distlib_package).find(name).bytes
AttributeError: 'NoneType' object has no attribute 'bytes'
(venv) C:\projects\nltk-tutorial>python -m pip install --upgrade pip
Requirement already up-to-date: pip in c:\projects\nltk-tutorial\venv\lib\site-packages (18.0)
(venv) C:\projects\nltk-tutorial>pip install
ERROR: You must give at least one requirement to install (see "pip help install")
You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
The text was updated successfully, but these errors were encountered: