Can I still use virtualenv after installing Anaconda? - python

I used to use virtualenv to create different project environments, same library (different versions). Recently, I installed Anaconda to do some Machine Learning. When I try to create a new environment using virtualenv I get this error:
(venv) usr#KC-SCE:~/Desktop/bTree$ pip install nltk
Requirement already satisfied: nltk in /home/usr/anaconda3/lib/python3.6/site-packages (3.3)
Requirement already satisfied: six in /home/usr/anaconda3/lib/python3.6/site-packages (from nltk) (1.11.0)
tensorflow-tensorboard 1.5.1 has requirement bleach==1.5.0, but you'll have bleach 2.1.3 which is incompatible.
tensorflow-tensorboard 1.5.1 has requirement html5lib==0.9999999, but you'll have html5lib 1.0.1 which is incompatible.
tensorboard 1.8.0 has requirement bleach==1.5.0, but you'll have bleach 2.1.3 which is incompatible.
tensorboard 1.8.0 has requirement html5lib==0.9999999, but you'll have html5lib 1.0.1 which is incompatible.
jupyterlab 0.32.1 has requirement jupyterlab_launcher<0.11.0,>=0.10.0, but you'll have jupyterlab-launcher 0.11.0 which is incompatible.
What I do not understand is that why I am not able to download a library that already exists! I may need it in another version or else.

Related

command not found: django

I installed django using
pip install Django
My result was
Requirement already satisfied: Django in /usr/local/lib/python2.7/site-packages (1.11.14)
When I run
django --version
I get
zsh: command not found: django
Here is the entire script:
➜ frameworks git:(master) ✗ pip install Django
Requirement already satisfied: Django in /usr/local/lib/python2.7/site-packages (1.11.14)
Requirement already satisfied: pytz in /usr/local/lib/python2.7/site-packages (from Django) (2018.5)
azure-cli-core 2.0.41 has requirement pyyaml~=4.2b4, but you'll have pyyaml 3.12 which is incompatible.
azure-cli-core 2.0.41 has requirement tabulate<=0.8.2,>=0.7.7, but you'll have tabulate 0.7.5 which is incompatible.
azure-cli-core 2.0.41 has requirement wheel==0.30.0, but you'll have wheel 0.31.0 which is incompatible.
rainbowstream 1.3.7 has requirement requests==2.5.3, but you'll have requests 2.18.4 which is incompatible.
flask 1.0.2 has requirement click>=5.1, but you'll have click 4.1 which is incompatible.
cli-helpers 1.0.2 has requirement tabulate[widechars]>=0.8.2, but you'll have tabulate 0.7.5 which is incompatible.
cookiecutter 1.6.0 has requirement click>=5.0, but you'll have click 4.1 which is incompatible.
cycli 0.7.6 has requirement prompt-toolkit==0.57, but you'll have prompt-toolkit 1.0.15 which is incompatible.
azure-cli-acs 2.1.3 has requirement pyyaml~=4.2b4, but you'll have pyyaml 3.12 which is incompatible.
azure-cli-interactive 0.3.25 has requirement pyyaml~=4.2b4, but you'll have pyyaml 3.12 which is incompatible.
azure-cli-extension 0.1.0 has requirement wheel==0.30.0, but you'll have wheel 0.31.0 which is incompatible.
azure-cli-container 0.2.1 has requirement pyyaml~=4.2b4, but you'll have pyyaml 3.12 which is incompatible.
legit 1.0.1 has requirement click==6.7, but you'll have click 4.1 which is incompatible.
➜ frameworks git:(master) ✗ django --version
zsh: command not found: django
➜ frameworks git:(master) ✗ django version
zsh: command not found: django
There is no command line utility named django. You should use django-admin:
$ django-admin version
1.11.14

weasyprint - installation in ubuntu.

I was trying to install weasyprint using command "pip install weasyprint".
It gave me error:
requests 2.18.4 has requirement chardet<3.1.0,>=3.0.2, but you'll have
chardet 2.3.0 which is incompatible.
tensorboard 1.8.0 has requirement html5lib==0.9999999, but you'll have
html5lib 1.0.1 which is incompatible.
bleach 1.5.0 has requirement html5lib!=0.9999,!=0.99999,
<0.99999999,>=0.999, but you'll have html5lib 1.0.1 which is
incompatible.
Does anyone know how to fix it?

the confusion of installing locustio

I use pip install locustio and being notified that success, but locust --help get message command not found locust.
and I use pip list and get result as below:
beautifulsoup4 (4.6.0)
click (6.7)
decorator (4.0.11)
Flask (0.12.2)
gevent (1.2.2)
greenlet (0.4.12)
html5lib (0.999999999)
itsdangerous (0.24)
Jinja2 (2.9.6)
locustio (0.8)
MarkupSafe (1.0)
msgpack-python (0.4.8)
oauthlib (2.0.2)
pip (9.0.1)
Pygments (2.2.0)
pyzmq (16.0.2)
requests (2.14.2)
requests-oauthlib (0.8.0)
robotframework (3.0.2)
robotframework-extendedrequestslibrary (0.5.5)
robotframework-requests (0.4.7)
robotframework-ride (1.5.2.1)
robotframework-selenium2library (1.8.0)
selenium (3.4.1)
setuptools (28.8.0)
six (1.10.0)
webencodings (0.5.1)
Werkzeug (0.12.2)
wxPython (2.8.12.1)
wxPython-common (2.8.12.1)
You can see that locustio has been installed. But why I can not use it properly ?
Anyone can give some advice?

Universal way of getting a list of Python modules?

I know that pip install or pip freeze can give out the list of python modules installed. Is there a way by which I could change the way I get the output?
For example: pip freeze gives me:
Landscape-Client==14.12
PAM==0.4.2
Twisted-Core==13.2.0
apt-xapian-index==0.45
argparse==1.2.1
Is there a way that I could change this to display:
Landscape-Client-14.12
PAM-0.4.2
Twisted-Core-13.2.0
apt-xapian-index-0.45
argparse-1.2.1
Also, is there a way to get the list of all python components - both from pip & pip3 or do I have to run the command individually?
The way I am looking at it is to see if we can somehow control the output that pip or pip3 gives us.
pip list outputs like the following
adium-theme-ubuntu (0.3.4)
appdirs (1.4.0)
argh (0.26.2)
args (0.1.0)
Babel (2.3.4)
BeautifulSoup (3.2.1)
cffi (1.9.1)
click (6.7)
clint (0.5.1)
colorama (0.3.7)
compass-stylesheets (1.0.2)
cryptography (1.7.2)
Cython (0.23)
decorator (4.0.11)
Django (1.10.5)
django-request (1.5.1)
djangorestframework (3.5.4)
docutils (0.13.1)
enum34 (1.1.6)
future (0.16.0)
get (0.0.0)
gitdb (0.6.4)
gitdb2 (2.0.0)
GitPython (2.1.1)
gyp (0.1)
httplib2 (0.10.3)
idna (2.2)
image (1.5.5)
influxdb (4.0.0)
ipaddress (1.0.18)
jedi (0.10.0)
Kivy (1.9.1)
Kivy-Garden (0.1.4)
Markdown (2.6.8)
monkeylearn (0.3.6)
networkx (1.11)
numpy (1.12.0)
olefile (0.44)
packaging (16.8)
pandas (0.19.2)
pathlib (1.0.1)
pathtools (0.1.2)
pefile (2016.3.28)
Pillow (4.0.0)
pip (9.0.1)
pkginfo (1.4.1)
post (0.0.0)
public (0.0.0)
pyasn1 (0.2.2)
pycparser (2.17)
pycrypto (2.6.1)
pycryptodome (3.4.5)
pyglet (1.2.4)
Pygments (2.2.0)
pygobject (3.22.0)
pyOpenSSL (16.2.0)
pyparsing (2.1.10)
PyPDF2 (1.26.0)
pyScss (1.3.5)
pystache (0.5.4)
Pyste (0.9.10)
python-dateutil (2.6.0)
pytz (2016.10)
pyxdg (0.25)
PyYAML (3.12)
query-string (0.0.0)
request (0.0.0)
requests (2.13.0)
requests-toolbelt (0.7.1)
rsa (3.4.2)
setupfiles (0.0.0)
setuptools (34.2.0)
simplejson (3.10.0)
six (1.10.0)
smmap (0.9.0)
smmap2 (2.0.1)
swapper (1.0.0)
twine (1.8.1)
ubuntuone-client-data (14.4)
unity-lens-photos (1.0)
urllib3 (1.21.1)
virtualenv (15.1.0)
watchdog (0.8.3)
wheel (0.29.0)
I've never tried to supply additional commands to "list" but as it was pointed out you could write a script.
I'm not quite sure what you mean by "All python components" as that's very broad.
The "pip freeze" commands outputs installed packages in requirements format.
pip list just outputs all locally installed packages along with their version in a somewhat cleaner format. Could you perhaps give me more information as to what you meant by "all python components" in case this answer doesn't help?

pip error code 1 when installing pyopenssl

Hi I am trying to install pyopenssl so i can use scrapy. When i run the installation i get this error with pip. I also get the same error when trying to install scrapy...
Command python setup.py egg_info failed with error code 1 in /private/var/folders/hy/76g5m82s4nx4b8f4m1tzdd9h0000gn/T/pip_build_joegavin/cryptography
Storing debug log for failure in /Users/joegavin/.pip/pip.log
here is my pip list incase i'm missing something
apptools (4.2.1)
argcomplete (0.6.7)
astropy (0.3)
atom (0.3.7)
backports.ssl-match-hostname (3.4.0.2)
beautifulsoup4 (4.3.1)
binstar (0.4.4)
biopython (1.63)
bitarray (0.8.1)
blaze (0.4.2)
blz (0.6.1)
bokeh (0.4.1)
boto (2.25.0)
casuarius (1.1)
cdecimal (2.3)
chaco (4.4.1)
colorama (0.2.7)
conda (3.4.2)
conda-build (1.3.1)
configobj (4.7.2)
cubes (0.10.2)
Cython (0.20.1)
DataShape (0.1.1)
distribute (0.7.3)
docutils (0.11)
enable (4.3.0)
enaml (0.9.1)
envisage (4.4.0)
Flask (0.10.1)
future (0.11.2)
gevent (1.0)
gevent-websocket (0.9.2)
gevent-zeromq (0.2.2)
greenlet (0.4.2)
grin (1.2.1)
h5py (2.2.1)
ipython (2.0.0)
itsdangerous (0.23)
jdcal (1.0)
Jinja2 (2.7.2)
keyring (3.3)
kiwisolver (0.1.2)
llvmpy (0.12.3)
lxml (3.3.5)
MarkupSafe (0.18)
matplotlib (1.3.1)
mayavi (4.3.1)
MDP (3.3)
mock (1.0.1)
netCDF4 (1.0.8)
networkx (1.8.1)
nltk (2.0.4)
nose (1.3.0)
numba (0.12.1)
numexpr (2.3.1)
numpy (1.8.0)
openpyxl (2.0.2)
pandas (0.13.1)
patsy (0.2.1)
pep8 (1.4.6)
PIL (1.1.7)
pip (1.5.6)
ply (3.4)
psutil (1.2.1)
py (1.4.20)
PyAudio (0.2.7)
pycosat (0.6.0)
pycparser (2.10)
pycrypto (2.6.1)
pycurl (7.19.0)
PyExcelerate (0.6.1)
pyface (4.4.0)
pyflakes (0.7.3)
Pygments (1.6)
pyinstall (0.1.4)
PyInstaller (2.1)
pykit (0.2.0)
pyparsing (2.0.1)
PySAL (1.6.0)
pysam (0.6)
pytest (2.5.2)
python-dateutil (1.5)
pytz (2013b)
PyYAML (3.11)
pyzmq (2.2.0.1)
redis (2.9.1)
requests (2.2.1)
rope (0.9.4)
scikit-image (0.9.3)
scikit-learn (0.14.1)
scipy (0.13.3)
setuptools (5.1)
six (1.5.2)
Sphinx (1.2.1)
spyder (2.2.5)
SQLAlchemy (0.9.2)
statsmodels (0.5.0)
sympy (0.7.4.1)
tables (3.1.0)
tornado (3.2)
traits (4.4.0)
traitsui (4.4.0)
ujson (1.33)
virtualenv (1.11.5)
VTK (5.10.1)
Werkzeug (0.9.4)
wsgiref (0.1.2)
xlrd (0.9.2)
XlsxWriter (0.5.2)
xlwt (0.7.5)
I've tried updating setup tools, reinstalling pip. I'm on OSX can anybody help? Thanks
UPDATE : Pastebin for pip.log : http://pastebin.com/MTNrR0n5
Error code 1 sometimes occurs due to lack of permissions. If you have an admin account, try prefacing your command with sudo.
Perhaps your Python lacks openssl support?
You can find out:
python
>>> import socket
>>> hasattr(socket, 'ssl')
True
If socket doesn't have the ssl attribute, you don't have the needed capabilities.
AFAIK, openssl support must be selected for compilation of the Python interpreter and cannot be installed afterwards.

Categories