pip install attrs==19.2.0 --user Collecting attrs==19.2.0 Using cached attrs-19.2.0-py2.py3-none-any.whl (40 kB) Installing collected
packages: attrs Attempting uninstall: attrs
Found existing installation: attrs 19.1.0
Uninstalling attrs-19.1.0:
Successfully uninstalled attrs-19.1.0 Successfully installed attrs-19.2.0 Note: you may need to restart the kernel to use updated
packages. ERROR: pdflatex 0.1.3 has requirement attrs<19.0,>=18.2, but
you'll have attrs 19.2.0 which is incompatible.
pip install pdflatex --user Requirement already satisfied: pdflatex in
c:\users\haris\appdata\roaming\python\python37\site-packages (0.1.3)
Collecting attrs<19.0,>=18.2 Using cached
attrs-18.2.0-py2.py3-none-any.whl (34 kB) Installing collected
packages: attrs Attempting uninstall: attrs
Found existing installation: attrs 19.2.0
Uninstalling attrs-19.2.0:
Successfully uninstalled attrs-19.2.0 Successfully installed attrs-18.2.0 Note: you may need to restart the kernel to use updated
packages. ERROR: hypothesis 5.5.4 has requirement attrs>=19.2.0, but
you'll have attrs 18.2.0 which is incompatible.
need help to install pdflatex
Related
pip install google-cloud-bigquery
Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /home/ec2-user/anaconda3/envs/python3/lib/python3.8/site-packages (from pyasn1-modules>=0.2.1->google-auth<3.0dev,>=1.25.0->google-api-core[grpc]!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0,<3.0.0dev,>=1.31.5->google-cloud-bigquery) (0.4.8)
Installing collected packages: pyasn1-modules, protobuf, grpcio, google-crc32c, cachetools, proto-plus, googleapis-common-protos, google-resumable-media, google-auth, grpcio-status, google-api-core, google-cloud-core, google-cloud-bigquery-storage, google-cloud-bigquery
Attempting uninstall: protobuf
Found existing installation: protobuf 3.19.1
Uninstalling protobuf-3.19.1:
Successfully uninstalled protobuf-3.19.1
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
sagemaker 2.117.0 requires protobuf<4.0,>=3.1, but you have protobuf 4.21.9 which is incompatible.
Successfully installed cachetools-5.2.0 google-api-core-2.10.2 google-auth-2.14.1 google-cloud-bigquery-3.4.0 google-cloud-bigquery-storage-2.16.2 google-cloud-core-2.3.2 google-crc32c-1.5.0 google-resumable-media-2.4.0 googleapis-common-protos-1.57.0 grpcio-1.51.0 grpcio-status-1.51.0 proto-plus-1.22.1 protobuf-4.21.9 pyasn1-modules-0.2.8
WARNING: You are using pip version 22.0.4; however, version 22.3.1 is available.
You should consider upgrading via the '/home/ec2-user/anaconda3/envs/python3/bin/python -m pip install --upgrade pip' command.
Note: you may need to restart the kernel to use updated packages.
ContextualVersionConflict: (protobuf 3.19.1 (/home/ec2-user/anaconda3/envs/python3/lib/python3.8/site-packages), Requirement.parse('protobuf!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.19.5'), {'google-cloud-bigquery-storage'})
Try running pip install -U protobuf~=3.20.0 and then pip install google-cloud-bigquery.
Protobuf 4.x versions have some incompatibilities with other libraries.
Ref: How to downgrade protobuf
I did the following command just now,
pip install --upgrade ipykernel
However, i got
Requirement already satisfied: ipykernel in ./anaconda3/lib/python3.8/site-packages (5.3.4)
Collecting ipykernel
Downloading ipykernel-6.5.0-py3-none-any.whl (125 kB)
|████████████████████████████████| 125 kB 4.3 MB/s
Collecting ipython<8.0,>=7.23.1
Downloading ipython-7.29.0-py3-none-any.whl (790 kB)
|████████████████████████████████| 790 kB 9.2 MB/s
Collecting debugpy<2.0,>=1.0.0
Downloading debugpy-1.5.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.9 MB)
|████████████████████████████████| 1.9 MB 126.8 MB/s
Collecting matplotlib-inline<0.2.0,>=0.1.0
Downloading matplotlib_inline-0.1.3-py3-none-any.whl (8.2 kB)
Collecting traitlets<6.0,>=5.1.0
Downloading traitlets-5.1.1-py3-none-any.whl (102 kB)
|████████████████████████████████| 102 kB 20.5 MB/s
...
Requirement already satisfied: python-dateutil>=2.1 in ./anaconda3/lib/python3.8/site-packages (from jupyter-client<8.0->ipykernel) (2.8.1)
Requirement already satisfied: ptyprocess>=0.5 in ./anaconda3/lib/python3.8/site-packages (from pexpect>4.3->ipython<8.0,>=7.23.1->ipykernel) (0.7.0)
Requirement already satisfied: wcwidth in ./anaconda3/lib/python3.8/site-packages (from prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->ipython<8.0,>=7.23.1->ipykernel) (0.2.5)
Requirement already satisfied: six>=1.5 in ./anaconda3/lib/python3.8/site-packages (from python-dateutil>=2.1->jupyter-client<8.0->ipykernel) (1.15.0)
Installing collected packages: traitlets, matplotlib-inline, ipython, debugpy, ipykernel
Attempting uninstall: traitlets
Found existing installation: traitlets 5.0.5
Uninstalling traitlets-5.0.5:
Successfully uninstalled traitlets-5.0.5
Attempting uninstall: ipython
Found existing installation: ipython 7.22.0
Uninstalling ipython-7.22.0:
Successfully uninstalled ipython-7.22.0
Attempting uninstall: ipykernel
Found existing installation: ipykernel 5.3.4
Uninstalling ipykernel-5.3.4:
Successfully uninstalled ipykernel-5.3.4
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
spyder 4.2.5 requires pyqt5<5.13, which is not installed.
spyder 4.2.5 requires pyqtwebengine<5.13, which is not installed.
conda-repo-cli 1.0.4 requires pathlib, which is not installed.
Successfully installed debugpy-1.5.1 ipykernel-6.5.0 ipython-7.29.0 matplotlib-inline-0.1.3 traitlets-5.1.1
I would like to revert my command, since some of my codes suddenly does not work
. Is it possible? Thanks!
It seems a lot fo packages are installed.
Update
So I actually had my environment.yaml from my previous conda env export > environment.yaml
If I do
conda env update --file environment.yaml --prune
It does not help me revert to my previous versions.... Can I force my base environment back to exactly environment.yaml?
I do not believe pip keeps a history of installed packages. If you have the text output from the terminal when you did the upgrade, pip does output a list of packages that will be installed, which version you had and which version you're replacing it with. You can manually revert each package by doing
pip uninstall <package_name> && pip install <package_name>==<version_number>
Edit: Based on your edits, I suggest you repost this question in terms of your conda environment. That's a totally different system, even though it does utilize pip.
As a side note, you might be able to get away with just running
pip install traitlets==5.0.5
pip install ipykernel==5.3.4
pip install ipython==7.22.0
I am updating PyGObject and give an error.
How should I update PyGObject
.....
Environment:
macOS Big Sur 11.5.2
python --version
Python 3.9.7
pip --version
pip 21.2.4 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)
my operation.
ERROR: Cannot uninstall 'PyGObject'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
pip install --upgrade PyGObject
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: PyGObject in /usr/local/lib/python3.9/site-packages (3.40.1)
Collecting PyGObject
Using cached PyGObject-3.42.0-cp39-cp39-macosx_11_0_x86_64.whl
Requirement already satisfied: pycairo>=1.16.0 in /usr/local/lib/python3.9/site-packages (from PyGObject) (1.20.1)
Installing collected packages: PyGObject
Attempting uninstall: PyGObject
Found existing installation: PyGObject 3.40.1
ERROR: Cannot uninstall 'PyGObject'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
Pip is unsure on the package dependencies to clean up in the upgrade. You can force the upgrade by telling it to ignore what is already installed.
pip install PyGObject --ignore-installed
I am getting an error while attempting to use Pyinstaller. After doing some research I believe the error is caused by a bug in the most recent version of setuptools (19.3). The fix seems to be downgrading to setuptools version 19.2. My issue is with the downgrade itself. My question is how does one downgrade setuptools in Ubuntu 15.04?
Just specify the version using pip:
pip install setuptools==19.2
If you are installing globally you will obviously need sudo.
~$ sudo pip install setuptools==19.2
Collecting setuptools==19.2
Downloading setuptools-19.2-py2.py3-none-any.whl (463kB)
100% |████████████████████████████████| 466kB 486kB/s
Installing collected packages: setuptools
Found existing installation: setuptools 19.1
Uninstalling setuptools-19.1:
Successfully uninstalled setuptools-19.1
Successfully installed setuptools-19.2
~$ sudo pip install setuptools==19.1
Collecting setuptools==19.1
Downloading setuptools-19.1-py2.py3-none-any.whl (463kB)
100% |████████████████████████████████| 466kB 377kB/s
Installing collected packages: setuptools
Found existing installation: setuptools 19.2
Uninstalling setuptools-19.2:
Successfully uninstalled setuptools-19.2
Successfully installed setuptools-19.1
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