Could not find a version that satisfies the requirement djangocms - python

Trying to follow a screencast to install DjangoCMS:
$ mkvirtualenv modern_business
$ pip install djangocms
and got an error:
I am using python 2.7. Any idea?

Looks like you need to install django cms installer:
(.envtest)$ pip install djangocms-installer
Collecting djangocms-installer
Downloading djangocms_installer-0.9.3-py2.py3-none-any.whl (57kB)
100% |████████████████████████████████| 61kB 628kB/s
Collecting argparse (from djangocms-installer)
Downloading argparse-1.4.0-py2.py3-none-any.whl
Collecting dj-database-url>=0.4 (from djangocms-installer)
Downloading dj-database-url-0.4.1.tar.gz
Successfully built dj-database-url tzlocal
.....
.....
Installing collected packages: argparse, dj-database-url, six, pytz, tzlocal, djangocms-installer
Successfully installed argparse-1.4.0 dj-database-url-0.4.1 djangocms-installer-0.9.3 pytz-2016.7 six-1.10.0 tzlocal-1.3
As per the doc here: http://docs.django-cms.org/en/release-3.4.x/introduction/install.html

Related

Installing python packages using requirements.txt file

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

Cannot get Twisted to work on a Mac

I am attempting to run the source code associated with the article at https://pawelmhm.github.io/python/websockets/2016/01/02/playing-with-websockets.html, but cannot get Twisted to work. I am using macOS High Sierra 10.13.5 and Python 3.6.4 (in a virtual environment).
To create the virtual environment I used:
python3 -m venv venv
. venv/bin/activate
where python3 is my system installed python 3.6.4:
$ which python3
/Library/Frameworks/Python.framework/Versions/3.6/bin/python3
I tried installing twisted using pip:
$ pip install twisted
Collecting twisted
Downloading https://files.pythonhosted.org/packages/12/2a/e9e4fb2e6b2f7a75577e0614926819a472934b0b85f205ba5d5d2add54d0/Twisted-18.4.0.tar.bz2 (3.0MB)
100% |████████████████████████████████| 3.0MB 1.9MB/s
Collecting zope.interface>=4.4.2 (from twisted)
Downloading https://files.pythonhosted.org/packages/ac/8a/657532df378c2cd2a1fe6b12be3b4097521570769d4852ec02c24bd3594e/zope.interface-4.5.0.tar.gz (151kB)
100% |████████████████████████████████| 153kB 281kB/s
Collecting constantly>=15.1 (from twisted)
Downloading https://files.pythonhosted.org/packages/b9/65/48c1909d0c0aeae6c10213340ce682db01b48ea900a7d9fce7a7910ff318/constantly-15.1.0-py2.py3-none-any.whl
Collecting incremental>=16.10.1 (from twisted)
Downloading https://files.pythonhosted.org/packages/f5/1d/c98a587dc06e107115cf4a58b49de20b19222c83d75335a192052af4c4b7/incremental-17.5.0-py2.py3-none-any.whl
Collecting Automat>=0.3.0 (from twisted)
Downloading https://files.pythonhosted.org/packages/a3/86/14c16bb98a5a3542ed8fed5d74fb064a902de3bdd98d6584b34553353c45/Automat-0.7.0-py2.py3-none-any.whl
Collecting hyperlink>=17.1.1 (from twisted)
Downloading https://files.pythonhosted.org/packages/a7/b6/84d0c863ff81e8e7de87cff3bd8fd8f1054c227ce09af1b679a8b17a9274/hyperlink-18.0.0-py2.py3-none-any.whl
Requirement already satisfied: setuptools in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from zope.interface>=4.4.2->twisted) (28.8.0)
Collecting attrs>=16.1.0 (from Automat>=0.3.0->twisted)
Downloading https://files.pythonhosted.org/packages/41/59/cedf87e91ed541be7957c501a92102f9cc6363c623a7666d69d51c78ac5b/attrs-18.1.0-py2.py3-none-any.whl
Requirement already satisfied: six in /Users/sumit/Library/Python/3.6/lib/python/site-packages (from Automat>=0.3.0->twisted) (1.11.0)
Collecting idna>=2.5 (from hyperlink>=17.1.1->twisted)
Downloading https://files.pythonhosted.org/packages/4b/2a/0276479a4b3caeb8a8c1af2f8e4355746a97fab05a372e4a2c6a6b876165/idna-2.7-py2.py3-none-any.whl (58kB)
100% |████████████████████████████████| 61kB 2.8MB/s
Installing collected packages: zope.interface, constantly, incremental, attrs, Automat, idna, hyperlink, twisted
Running setup.py install for zope.interface ... done
Running setup.py install for twisted ... done
Successfully installed Automat-0.7.0 attrs-18.1.0 constantly-15.1.0 hyperlink-18.0.0 idna-2.7 incremental-17.5.0 twisted-18.4.0 zope.interface-4.5.0
But I keep getting the error:
$ python server.py
Traceback (most recent call last):
File "server.py", line 4, in <module>
from twisted.web.static import File
ModuleNotFoundError: No module named 'twisted'
Search on the web resulted in no useful resolution and attempts to use either easy_install or brew did not work too. Any suggestions are appreciated.
Thank you #9769953, that resolved the issue!
If anyone else searches for this issue (and for my future reference!), use:
python -m pip install twisted
I did have a virtual environment but apparently the python and pip combination was messing this up. Using python -m pip resolved the dependency issue.

How to uninstall dependencies introduced by a Python package installed with Pip?

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.

Installing twisted on python 3.5 and virtualenv using pip

when i run
pip install twisted
in the command line in windows, it starts installing packages until the flowing line comes up.
failed building wheel for twisted
pip then crashed soon after, saying it has failed the installation.
why is this ?
is there a way round it to install twisted?
my wheel version is 0.29, windows 10. twisted installs fine on python 2.7
thanks
I meet similar problem like yours.You can try to install the Twisted whit wheels
but at first,you should install the wheels
pip install wheels
then,download an appropriate version from this
website:http://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted
you can get xxxx.whl file
use
pip install xxxx/xxxxxx.whl
Finished!
Basically, that is not a programming question (I feel it might as well fit well into https://superuser.com/ or https://serverfault.com/).
Could you please provide a tad more information?
What OS are you running? What version?
For comparison, I'm running Debian GNU/Linux (testing), and
pip3 install twisted
performs fine:
collecting twisted
Using cached Twisted-17.1.0.tar.bz2
Collecting zope.interface>=4.0.2 (from twisted)
Using cached zope.interface-4.3.3.tar.gz
Collecting constantly>=15.1 (from twisted)
Downloading constantly-15.1.0-py2.py3-none-any.whl
Collecting incremental>=16.10.1 (from twisted)
Downloading incremental-16.10.1-py2.py3-none-any.whl
Collecting Automat>=0.3.0 (from twisted)
Using cached Automat-0.5.0-py2.py3-none-any.whl
Requirement already satisfied: setuptools in /usr/local/lib/python3.5/dist-packages (from zope.interface>=4.0.2->twisted)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from Automat>=0.3.0->twisted)
Collecting attrs (from Automat>=0.3.0->twisted)
Using cached attrs-16.3.0-py2.py3-none-any.whl
Requirement already satisfied: packaging>=16.8 in /usr/local/lib/python3.5/dist-packages (from setuptools->zope.interface>=4.0.2->twisted)
Requirement already satisfied: appdirs>=1.4.0 in /usr/local/lib/python3.5/dist-packages (from setuptools->zope.interface>=4.0.2->twisted)
Requirement already satisfied: pyparsing in /usr/local/lib/python3.5/dist-packages (from packaging>=16.8->setuptools->zope.interface>=4.0.2->twisted)
Building wheels for collected packages: twisted, zope.interface
Running setup.py bdist_wheel for twisted ... done
Stored in directory: /root/.cache/pip/wheels/65/e3/44/cd3da92c03926aabc80e658e11d6e64619abce3ef44c1c34df
Running setup.py bdist_wheel for zope.interface ... done
Stored in directory: /root/.cache/pip/wheels/00/aa/8b/f1d1eb398423e59894b45ee151344e243808156c2d182c9f4e
Successfully built twisted zope.interface
Installing collected packages: zope.interface, constantly, incremental, attrs, Automat, twisted
Successfully installed Automat-0.5.0 attrs-16.3.0 constantly-15.1.0 incremental-16.10.1 twisted-17.1.0 zope.interface-4.3.3
I must admit, this install was done outside of virtualenv.
Did you try installing twisted outside your virtualenv?

Pip installation on virtual environment throwing error on versions of dependency package

We are trying to install OpenStack Services. We have created the virtual environment and installed Pip as well. Pip version is 8.1.1. Now when we try to install keystone we getting the error with dependency package as below:
/tmp/openstack-venv-builder/venvs/horizon/bin/pip install --timeout 120 --find-links /var/www/repo/os-releases/liberty --no-index --log /var/log/repo/repo_venv_builder.log keystone
Ignoring indexes: http://pypi.python.org/simple
Collecting keystone
Collecting oslo.i18n<1.6.0,>=1.5.0 (from keystone)
Could not find a version that satisfies the requirement oslo.i18n<1.6.0,>=1.5.0 (from keystone) (from versions: 3.1.0)
No matching distribution found for oslo.i18n<1.6.0,>=1.5.0 (from keystone)
Installation on oslo.i18n looks fine.
/tmp/openstack-venv-builder/venvs/horizon/bin/pip install --timeout 120 --find-links /var/www/repo/os-releases/liberty --no-index --log /var/log/repo/repo_venv_builder.log oslo.i18n
Ignoring indexes: http://pypi.python.org/simple
Collecting oslo.i18n
Collecting pbr>=1.6 (from oslo.i18n)
Collecting Babel>=1.3 (from oslo.i18n)
Collecting six>=1.9.0 (from oslo.i18n)
Collecting pytz>=0a (from Babel>=1.3->oslo.i18n)
Installing collected packages: pbr, pytz, Babel, six, oslo.i18n
Successfully installed Babel-2.1.1 oslo.i18n-3.1.0 pbr-1.8.1 pytz-2015.7 six-1.10.0
Even then we are getting error while installing keystone. Please help.

Categories