PythonAnywhere Forums

PermissionError: [Errno 13] Permission denied: '/usr/local/bin/markdown_py'

I just want to upgrade some modules that satisfy the running of my program. However, every time I use command like "pip3.5 install -- upgrade [module name]" ,there is always a exception like this.

pip3.5 install --upgrade tensorflow                                                                                         
Collecting tensorflow
  Using cached tensorflow-1.2.0-cp35-cp35m-manylinux1_x86_64.whl
Requirement already up-to-date: six>=1.10.0 in /usr/local/lib/python3.5/dist-packages (from tensorflow)
Collecting markdown==2.2.0 (from tensorflow)
Requirement already up-to-date: wheel>=0.26 in /usr/local/lib/python3.5/dist-packages (from tensorflow)
Collecting bleach==1.5.0 (from tensorflow)
Collecting werkzeug>=0.11.10 (from tensorflow)
  Using cached Werkzeug-0.12.2-py2.py3-none-any.whl
Collecting backports.weakref==1.0rc1 (from tensorflow)
  Using cached backports.weakref-1.0rc1-py3-none-any.whl
Collecting numpy>=1.11.0 (from tensorflow)
  Using cached numpy-1.13.0-cp35-cp35m-manylinux1_x86_64.whl
Requirement already up-to-date: html5lib==0.9999999 in /usr/local/lib/python3.5/dist-packages (from tensorflow)
Collecting protobuf>=3.2.0 (from tensorflow)
  Using cached protobuf-3.3.0-cp35-cp35m-manylinux1_x86_64.whl
Collecting setuptools (from protobuf>=3.2.0->tensorflow)
  Using cached setuptools-36.0.1-py2.py3-none-any.whl
Installing collected packages: markdown, bleach, werkzeug, backports.weakref, numpy, setuptools, protobuf, tensorflow
  Found existing installation: Markdown 2.6.6
    Uninstalling Markdown-2.6.6:
Exception:
Traceback (most recent call last):
  File "/usr/lib/python3.5/shutil.py", line 538, in move
    os.rename(src, real_dst)
OSError: [Errno 18] Invalid cross-device link: '/usr/local/bin/markdown_py' -> '/tmp/pip-wpjongrp-uninstall/usr/local/bin/markdown_py'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
  File "/usr/local/lib/python3.5/dist-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
  File "/usr/local/lib/python3.5/dist-packages/pip/req/req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
  File "/usr/local/lib/python3.5/dist-packages/pip/req/req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
  File "/usr/local/lib/python3.5/dist-packages/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
  File "/usr/local/lib/python3.5/dist-packages/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
  File "/usr/lib/python3.5/shutil.py", line 553, in move
os.unlink(src)
PermissionError: [Errno 13] Permission denied: '/usr/local/bin/markdown_py'

How can I solve this?

https://help.pythonanywhere.com/pages/InstallingNewModules

thanks