I'm trying to install guesslang with pip but it seems that the last version (which was released on August 2021) depends on an obsolete version of Tensorflow (2.5.0). The problem is that I can't find this version anywhere.
So, how can I install it? Or is there any other python library that does language detection?
However here's the error I get when trying to install it, maybe I misunderstood...
> pip install guesslang
Collecting guesslang
Using cached guesslang-2.2.1-py3-none-any.whl (2.5 MB)
Using cached guesslang-2.2.0-py3-none-any.whl (2.5 MB)
Using cached guesslang-2.0.3-py3-none-any.whl (2.1 MB)
Using cached guesslang-2.0.1-py3-none-any.whl (2.1 MB)
Using cached guesslang-2.0.0-py3-none-any.whl (13.0 MB)
Using cached guesslang-0.9.3-py3-none-any.whl (3.2 MB)
Collecting numpy
Using cached numpy-1.24.1-cp310-cp310-win_amd64.whl (14.8 MB)
Collecting guesslang
Using cached guesslang-0.9.1-py3-none-any.whl (3.2 MB)
ERROR: Cannot install guesslang==0.9.1, guesslang==0.9.3, guesslang==2.0.0, guesslang==2.0.1, guesslang==2.0.3, guesslang==2.2.0 and guesslang==2.2.1 because these package versions have conflicting dependencies.
The conflict is caused by:
guesslang 2.2.1 depends on tensorflow==2.5.0
guesslang 2.2.0 depends on tensorflow==2.5.0
guesslang 2.0.3 depends on tensorflow==2.5.0
guesslang 2.0.1 depends on tensorflow==2.2.0
guesslang 2.0.0 depends on tensorflow==2.2.0
guesslang 0.9.3 depends on tensorflow==1.7.0rc1
guesslang 0.9.1 depends on tensorflow==1.1.0
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
tensorflow 2.5.0 released wheels for Python 3.6-3.9. Downgrade to Python 3.9 to install guesslang with tensorflow 2.5.0.
Related
i'm trying to install some packages from python using a requirements.txt file and some execute until i run into this error
Collecting numpy
Using cached numpy-1.24.1-cp311-cp311-win_amd64.whl (14.8 MB)
Collecting nltk
Using cached nltk-3.8.1-py3-none-any.whl (1.5 MB)
Collecting gensim
Using cached gensim-4.3.0-cp311-cp311-win_amd64.whl (24.0 MB)
Collecting scikit-learn
Using cached scikit_learn-1.2.0-cp311-cp311-win_amd64.whl (8.2 MB)
Collecting PyDictionary
Using cached PyDictionary-2.0.1-py3-none-any.whl (6.1 kB)
Collecting fuzzywuzzy
Using cached fuzzywuzzy-0.18.0-py2.py3-none-any.whl (18 kB)
Requirement already satisfied: beautifulsoup4 in c:\users\administrator\plagcheker\.plagenv\lib\site-packages (from -r requirements.txt (line 7)) (4.11.1)
Collecting python-Levenshtein
Using cached python_Levenshtein-0.20.9-py3-none-any.whl (9.4 kB)
Collecting pandas
Using cached pandas-1.5.2-cp311-cp311-win_amd64.whl (10.3 MB)
Collecting py-stringmatching
Using cached py_stringmatching-0.4.2.tar.gz (661 kB)
Preparing metadata (setup.py) ... done
ERROR: Ignored the following versions that require a different python version: 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11
ERROR: Could not find a version that satisfies the requirement tkinter (from versions: none)
ERROR: No matching distribution found for tkinter
my requirements.txt has:
nltk
gensim
scikit-learn
PyDictionary
fuzzywuzzy
beautifulsoup4
python-Levenshtein
pandas
py-stringmatching
tkinter
python-docx
What could be the issue?
First - tkinter should be already installed on your Python if you have Windows or MacOS Info here
Second - for debian and linux - Tkinter isn't distributed through pip; if it didn't come pre-packaged with Python, you have to get it from elsewhere
For Python 3:
sudo apt-get install python3-tk
For Python 2.7
sudo apt-get install python-tk
As you can see names aren't equal to 'tkinter' so change it to your version
It'll work only if you are using yum
yum install tkinter
P.S. If for some reason you don't have it on MAC you can use commands for Debian and Linux in other syntax:
brew install python-tk
Name, as you can see, is still not 'tkinter'. You can change it in your 'requirements.txt' file if your .exe doesn't use pip
You should install
sudo apt-get install python-tk
This should solve your issue
im installing pyqt5 tools and this happens
C:\Users\Jansen>pip install pyqt5-tools
Collecting pyqt5-tools
Using cached pyqt5_tools-5.15.4.3.2-py3-none-any.whl (29 kB)
Using cached pyqt5_tools-5.15.4.3.1-py3-none-any.whl (28 kB)
Using cached pyqt5_tools-5.15.4.3.0.3-py3-none-any.whl (28 kB)
Using cached pyqt5_tools-5.15.3.3.2-py3-none-any.whl (29 kB)
Using cached pyqt5_tools-5.15.3.3.1-py3-none-any.whl (28 kB)
Downloading pyqt5_tools-5.15.3.3.0.3-py3-none-any.whl (28 kB)
Downloading pyqt5_tools-5.15.2.3.2-py3-none-any.whl (29 kB)
Collecting python-dotenv
Using cached python_dotenv-0.20.0-py3-none-any.whl (17 kB)
Collecting pyqt5==5.15.2
Downloading PyQt5-5.15.2.tar.gz (3.3 MB)
---------------------------------------- 3.3/3.3 MB 6.9 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error`
im trying to install pyqt5 so that i can use the pyuic5 command
As I can't yet comment questions, may I ask: are you using a virtual environment?
Anyway, you could try with this command:
pip install pyqt5-tools~=5.15
Moreover, as #musicamante said, if you're using a Python version that's above 3.10, a downgrade to version 3.9 or older is recommended as pyqt tools ar still not compatible with >3.9 versions. However, as I've seen here, you can try installing an specific 5.15 release version, so please try:
pip install PyQt5==5.15.5
Download python 3.9
Download virtualenv from https://bootstrap.pypa.io/virtualenv.pyz
Copy virtualenv.pyz to python 3.9 directory
Install virtualenv
python virtualenv.pyz env_folder
Go to env_folder/Script.
Run activate file
pip install pyqt5-tools
Run Qt
pyqt5-tools designer
I faced the same problem, install the desired tool, in my case QT designer, i was not getting it installed with pyqt5-tools command, instead i used pip install pyqt5 designer, then the designer was not opening in terminal, then go to your python directory and find the name that designer has been assigned, in my case it was named only designer, then you can open the tool by giving the name in the directory.
I would like to install scikit-learn==0.24.0 and scipy==1.7.1 which is one of its dependencies.
Scikit-learn needs a version of scipy that is >=0.19.1.
I have the following requirements.txt :
scipy==1.7.1
scikit-learn==0.24.0
So,
it downloads scipy 1.7.1
it downloads scikit-learn 0.24.0.
It downloads scipy again with the 1.7.3 version
Version of Python: 3.7
Version of Pip: 18.1
I would like to have scipy download only the first time. How can it be done?
(Using the answer box to provide a formatted code.) Works for me: Debian Linux, Python 3.7, pip 21.3.1:
$ mktmpenv -p python3.7
(tmp-bf2774e21725ffd2) $ echo "scipy==1.7.1
> scikit-learn==0.24.0" > requirements.txt
(tmp-bf2774e21725ffd2) $ pip install -r requirements.txt
Collecting scipy==1.7.1
Downloading scipy-1.7.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (28.5 MB)
|################################| 28.5 MB 12.0 MB/s
Collecting scikit-learn==0.24.0
Downloading scikit_learn-0.24.0-cp37-cp37m-manylinux2010_x86_64.whl (22.3 MB)
|################################| 22.3 MB 11.4 MB/s
Collecting numpy<1.23.0,>=1.16.5
Downloading numpy-1.21.5-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.7 MB)
|################################| 15.7 MB 14.5 MB/s
Collecting threadpoolctl>=2.0.0
Downloading threadpoolctl-3.0.0-py3-none-any.whl (14 kB)
Collecting joblib>=0.11
Downloading joblib-1.1.0-py2.py3-none-any.whl (306 kB)
|################################| 306 kB 11.2 MB/s
Installing collected packages: numpy, threadpoolctl, scipy, joblib, scikit-learn
Successfully installed joblib-1.1.0 numpy-1.21.5 scikit-learn-0.24.0 scipy-1.7.1 threadpoolctl-3.0.0
Got it.
It was due to pip.
With pip 18.1, it doesn't work.
With pip 21.3, it works.
I have upgraded pip.
I am not able to pip install fbprophet neither to pip install pystan.
I am using VS Code and Python 3.9.3 64-bit on Windows 10. I also updated to the newest version of Visual Studio Build tools (16.11.3) since some people are saying, you need at least Visual Studio C++ 14.0 for using pystan.
Collecting pystan
Using cached pystan-3.2.0-py3-none-any.whl (13 kB)
Collecting clikit<0.7,>=0.6
Using cached clikit-0.6.2-py2.py3-none-any.whl (91 kB)
Collecting aiohttp<4.0,>=3.6
Using cached aiohttp-3.7.4.post0-cp39-cp39-win_amd64.whl (634 kB)
Collecting pysimdjson<4.0,>=3.2
Using cached pysimdjson-3.2.0-cp39-cp39-win_amd64.whl (157 kB)
ERROR: Could not find a version that satisfies the requirement httpstan<4.6,>=4.5 (from pystan) (from versions: 0.2.5, 0.3.0, 0.3.1, 0.4.0, 0.5.0, 0.6.0, 0.7.2, 0.7.3, 0.7.5, 0.7.6, 0.8.0, 0.9.0, 0.10.1)
ERROR: No matching distribution found for httpstan<4.6,>=4.5 (from pystan)
Also trying to install httpstan doesnt work and also gives me even more errors.
I have seen people using conda/anaconda, but I dont use that.
Any help appreciated.
The problem is in installing httpstan. You are using Windows, but according to its pypi page it only supports Linux and MacOS. This is confirmed by the list of wheels.
You may bypass this by using a VM or docker, both of which are out-of-scope of this question so try to research that.
I tried to install PyLint. When installing I saw the following:
Collecting pylint
Downloading pylint-1.6.5-py2.py3-none-any.whl (577kB)
100% |████████████████████████████████| 583kB 655kB/s
Collecting six (from pylint)
Using cached six-1.10.0-py2.py3-none-any.whl
Collecting isort>=4.2.5 (from pylint)
Downloading isort-4.2.5-py2.py3-none-any.whl (40kB)
100% |████████████████████████████████| 40kB 737kB/s
Collecting mccabe (from pylint)
Downloading mccabe-0.6.1-py2.py3-none-any.whl
Collecting configparser; python_version == "2.7" (from pylint)
Downloading configparser-3.5.0.tar.gz
Collecting backports.functools-lru-cache; python_version == "2.7" (from pylint)
Downloading backports.functools_lru_cache-1.3-py2.py3-none-any.whl
Collecting astroid<1.5.0,>=1.4.5 (from pylint)
Downloading astroid-1.4.9-py2.py3-none-any.whl (213kB)
100% |████████████████████████████████| 215kB 713kB/s
Collecting lazy-object-proxy (from astroid<1.5.0,>=1.4.5->pylint)
Downloading lazy-object-proxy-1.2.2.tar.gz
Collecting wrapt (from astroid<1.5.0,>=1.4.5->pylint)
Downloading wrapt-1.10.8.tar.gz
Building wheels for collected packages: configparser, lazy-object-proxy, wrapt
Running setup.py bdist_wheel for configparser ... done
Stored in directory: /Users/dkanesha/Library/Caches/pip/wheels/1c/bd/b4/277af3f6c40645661b4cd1c21df26aca0f2e1e9714a1d4cda8
Running setup.py bdist_wheel for lazy-object-proxy ... done
Stored in directory: /Users/dkanesha/Library/Caches/pip/wheels/06/d4/af/71508d0c69292f8c369ba3ae83cd85fabcd6956fd5709633b4
Running setup.py bdist_wheel for wrapt ... done
Stored in directory: /Users/dkanesha/Library/Caches/pip/wheels/19/8a/01/20cf74c3f38d49ef8e9b9aa7ffd38cefff79bad9f6f2c651f0
Successfully built configparser lazy-object-proxy wrapt
Installing collected packages: six, isort, mccabe, configparser, backports.functools-lru-cache, lazy-object-proxy, wrapt, astroid, pylint
Successfully installed astroid-1.4.9 backports.functools-lru-cache-1.3 configparser-3.5.0 isort-4.2.5 lazy-object-proxy-1.2.2 mccabe-0.6.1 pylint-1.6.5 six-1.10.0 wrapt-1.10.8
Can I uninstall the packages mentioned here Installing collected packages: six, isort, mccabe, configparser, backports.functools-lru-cache, lazy-object-proxy, wrapt, astroid, pylint to restore to the previous state, or could the "Installing collected packages" refer to packages previously installed too?
There are two useful packages to deal with it.
Use the package pip-autoremove to uninstall package and its dependencies. You can also use pipdeptree to display a tree relationship of all installed packages.
pip will pretty explicitly tell you what exactly it does. If required packages are already installed, they won't be listed in the "successfully installed" list and it will say "requirement already satisfied" instead. If a dependency was upgraded during the installation, it will explicitly say that it found a previous version, that it uninstalled the previous version and that it installed a new version.
So, yes, in your case it does not look like it upgraded any old packages and purely installed new packages, so uninstalling all those should revert you to your previous state.