Can pypoetry install only the dependency that I ask it to add? - python

When running poetry add package, poetry decides to update some out of date dependencies without my asking:
$ poetry add -D ipython
Using version ^7.26.0 for ipython
Updating dependencies
Resolving dependencies... (6.8s)
Writing lock file
Package operations: 13 installs, 2 updates, 0 removals
• Installing ipython-genutils (0.2.0)
• Installing parso (0.8.2)
• Installing ptyprocess (0.7.0)
• Installing traitlets (5.0.5)
• Installing wcwidth (0.2.5)
• Installing appnope (0.1.2)
• Installing backcall (0.2.0)
• Updating connexion (2.8.0 -> 2.9.0) <---------- "I never asked for this"
• Installing jedi (0.18.0)
• Installing matplotlib-inline (0.1.2)
• Installing pexpect (4.8.0)
• Installing pickleshare (0.7.5)
• Installing prompt-toolkit (3.0.19)
• Installing ipython (7.26.0)
• Updating ramda (0.6.0 -> 0.6.1) <---------- "I never asked for this"
And yet when getting the help for the command, there doesn't seem to be anything that suggest that it's possible to disable this behaviour:
$ poetry add --help
USAGE
poetry add [-D] [-E <...>] [--optional] [--python <...>]
[--platform <...>] [--source <...>] [--allow-prereleases]
[--dry-run] [--lock] <name1> ... [<nameN>]
ARGUMENTS
<name> The packages to add.
OPTIONS
-D (--dev) Add as a development dependency.
-E (--extras) Extras to activate for the dependency.
(multiple values allowed)
--optional Add as an optional dependency.
--python Python version for which the dependency must be
installed.
--platform Platforms for which the dependency must be
installed.
--source Name of the source to use to install the
package.
--allow-prereleases Accept prereleases.
--dry-run Output the operations but do not execute
anything (implicitly enables --verbose).
--lock Do not perform operations (only update the
lockfile).
GLOBAL OPTIONS
-h (--help) Display this help message
-q (--quiet) Do not output any message
-v (--verbose) Increase the verbosity of messages: "-v" for
normal output, "-vv" for more verbose output and
"-vvv" for debug
-V (--version) Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n (--no-interaction) Do not ask any interactive question
...
Any way to install only the package of interest?
I prefer not to update deps, even if the bump is a minor bump - dependabot exists for this purpose already.

Related

Poetry install on an existing project Error "does not contain any element"

I am using Poetry for the first time.
I have a very simple project. Basically
a_project
|
|--test
| |---test_something.py
|
|-script_to_test.py
From a project I do poetry init and then poetry install
I get the following
poetry install
Updating dependencies
Resolving dependencies... (0.5s)
Writing lock file
Package operations: 7 installs, 0 updates, 0 removals
• Installing attrs (22.2.0)
• Installing exceptiongroup (1.1.0)
• Installing iniconfig (2.0.0)
• Installing packaging (23.0)
• Installing pluggy (1.0.0)
• Installing tomli (2.0.1)
• Installing pytest (7.2.1)
/home/me/MyStudy/2023/pyenv_practice/dos/a_project/a_project does not contain any element
after this I can run poetry run pytest without problem but what does that error message mean?
This is probably because Poetry tries to install your project but does not find it (there’s no a_project module inside your directory). You can tell it not to install the root project with --no-root:
poetry install --no-root
As of today there is no way to configure this to be the default (see this issue).
My issue got away after pointed correct interpreter in PyCharm. Poetry makes project environment in its own directories and PyCharm didn't link that correct.
I've added new environment in PyCharm and select poetary's just created enviroment in dialogs.
Check if your pyproject.toml contains something like:
[tool.poetry]
packages = [{include = "a_project"}]
Removing the line with packages = [{include = "a_project"}] helped in my case and should avoid including the root project. See documentation here.
create a dir with_your_package_name that u find in the file and an empty __init__.py in project root
delete the poetry.lock and install again

Creating an environment from an environment.yml file tqdm access is denied

I am trying to create an environment from an environment.yml file by running conda env create -f environment.yml in an administrator command prompt. The environment.yml file is as the following:
name: pytorch0.4
channels:
- pytorch
- defaults
dependencies:
- python=3.6.5
- pytorch=0.4.1
- torchvision
- numpy
- nltk
- ipython
- docopt
- pip
- pip:
- tqdm
After running the command, this error appeared:
Collecting package metadata (repodata.json): done
Solving environment: \
Warning: 2 possible package resolutions (only showing differing packages):
- defaults/noarch::parso-0.8.1-pyhd3eb1b0_0, defaults/win-64::jedi-0.17.0-py36_0
- defaults/noarch::parso-0.7.0-py_0, defaults/win-64::jedi-0.17.2-py36haa95532done
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Installing pip dependencies: - Ran pip subprocess with arguments:
['C:\\Users\\PC\\anaconda3\\envs\\pytorch0.4\\python.exe', '-m', 'pip', 'install', '-U', '-r', 'C:\\Users\\Assignment\\A2\\a2\\condaenv.1tcu2wl4.requirements.txt']
Pip subprocess output:
Requirement already satisfied: tqdm in c:\users\pc\anaconda3\envs\pytorch0.4\lib\site-packages (from -r C:\Users\Assignment\A2\a2\condaenv.1tcu2wl4.requirements.txt (line 1)) (4.56.0)
Collecting tqdm
Using cached tqdm-4.58.0-py2.py3-none-any.whl (73 kB)
Installing collected packages: tqdm
Attempting uninstall: tqdm
Found existing installation: tqdm 4.56.0
Uninstalling tqdm-4.56.0:
Successfully uninstalled tqdm-4.56.0
Pip subprocess error:
ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\\Users\\PC\\AppData\\Local\\Temp\\pip-uninstall-yeq37y9s\\tqdm.exe'
Consider using the `--user` option or check the permissions.
failed
CondaEnvException: Pip failed
I don't think my environment was created correctly, since I cannot use the dependencies in the environment nor activate it. I also tried to install tqdm by running pip install tqdm --user, it says that Requirement already satisfied: tqdm in c:\users\pc\appdata\roaming\python\python38\site-packages (4.58.0). How do I initiate that environment then?
Conda should be able to solve this without resorting to pip since tdqm is available on the defaults channel. Moreover, nltk has tdqm as dependency, so the YAML could be simplified to
File: pytorch0.4.yaml
name: pytorch0.4
channels:
- pytorch
- defaults
dependencies:
- python=3.6.5
- pytorch=0.4.1
- torchvision
- numpy
- nltk
- ipython
- docopt
- pip
Also, while using pip in Conda environments is valid, it comes with some caveats. One of these is to never use the --user flag, since this ends up placing packages outside the environment's site-packages and can lead to violating the isolation of environments that Conda is so keen on establishing.
Go to "pyvenv.cfg" file in your Python project and change include-system-site-packages from false to true.

deployment with fabric issues

Hello I have trouble understanding packages manager such as apt pip pip3
I am trying to automate shell command with the use of fabric3 library
I am following a book which tells me to write the following shell command pip install fabric3
My fabfile.py contains f-strings which are working on python3 only
when I do pip list I see Fabric3 (1.14.post1) so I am assuming that the package is successfully installed, yet when I run my fab, I get fab not found, and command line is telling me to sudo apt install fabric
But doing so is useless, because fabric is working only with python2.7
Basically I have thought of two possible solutions to my problem :
1- Trying to make the fab command to use python3.6 instead of python2.7 ? But I don't know how to do that ...
2- Deleting Fabric, and keeping Fabric3, but for some reason, I get this 'fab' not found and I don't understand why
I have read the documentation but It is really obscur, I find no answer to my issue
Any help will be greatly appreciated,
Thanks
Update1:
So when I run pip list
asn1crypto (0.24.0)
attrs (17.4.0)
Automat (0.6.0)
bcrypt (3.1.7)
blinker (1.4)
certifi (2018.1.18)
cffi (1.13.2)
chardet (3.0.4)
click (6.7)
cloud-init (19.2)
colorama (0.3.7)
command-not-found (0.3)
configobj (5.0.6)
constantly (15.1.0)
cryptography (2.8)
distro-info (0.18ubuntu0.18.04.1)
Fabric3 (1.14.post1)
httplib2 (0.9.2)
hyperlink (17.3.1)
idna (2.6)
incremental (16.10.1)
Jinja2 (2.10)
jsonpatch (1.16)
jsonpointer (1.10)
jsonschema (2.6.0)
keyring (10.6.0)
keyrings.alt (3.0)
language-selector (0.1)
MarkupSafe (1.0)
netifaces (0.10.4)
oauthlib (2.0.6)
PAM (0.4.2)
paramiko (2.7.1)
pip (9.0.1)
pyasn1 (0.4.2)
pyasn1-modules (0.2.1)
pycparser (2.19)
pycrypto (2.6.1)
pygobject (3.26.1)
PyJWT (1.5.3)
PyNaCl (1.3.0)
pyOpenSSL (17.5.0)
pyserial (3.4)
python-apt (1.6.4)
python-debian (0.1.32)
pyxdg (0.25)
PyYAML (3.12)
requests (2.18.4)
requests-unixsocket (0.1.5)
SecretStorage (2.3.1)
service-identity (16.0.0)
setuptools (39.0.1)
six (1.13.0)
ssh-import-id (5.7)
systemd-python (234)
Twisted (17.9.0)
ufw (0.36)
unattended-upgrades (0.1)
urllib3 (1.22)
wheel (0.30.0)
zope.interface (4.3.2)
Fabric3 is correctly installed
Then, I run this command to deploy my code on server :
fab deploy:host=xxx#yyy
where xxx is username
and yyy is domain name
I get the following error : Command 'fab' not found, but can be installed with: sudo apt install fabric
NOTE: I tried this command update-alternatives --install /usr/bin/python python /usr/bin/python3.6 10
found on this topic Unable to set default python version to python3 in ubuntu
and which python stills points to /usr/bin/python
I have found that I have /usr/bin/python3.6
Do you think if I manage to have the which python pointing to /usr/bin/python3.6 my issue will be solved?
First of all fabric3 is unauthorized fork of fabric as stated here:
unfortunately, the fabric3 entry on PyPI is an unauthorized fork of
Fabric 1.x which we do not control. Once modern Fabric gets up to 3.x,
4.x etc, we’ll likely continue distributing it via both fabric and fabric2 for convenience; there will never be any official fabric3,
fabric4 etc.
In other words, fabric2 is purely there to help users of 1.x cross the
2.0 “major rewrite” barrier; future major versions will not be large rewrites and will only have small sets of backward incompatibilities.
Source
Please be aware that you have two versions of Python installed on your system. python2.7 and python3.6. When you call pip install PACKAGE_NAME it invokes by default the pip associated with ptyhon2.7.
To make sure which one is used type the following command pip --version. I guess it will return something like this pip x.x.x from /usr/lib/python2.7/site-packages (python 2.7). Thus, you have to install pip for python3.6 on your system. Please notice that you have then to use pip3 instead of pip.
Uninstall fabri3 by executing the following command: pip uninstall fabric3
Install fabric2 using newly installed pip3 install fabric>=2.4.0
Run fab deploy from the directory where you have your deploy script. Don't forget to give the name deploy to your function which is responsible for the deploy like this:
from fabric import Connection as connection, task
#task
def deploy(ctx):
with connection(host=host, user=user) as c:
c.run('pwd')

qscintilla python binding issue

Attempting to follow the QSCintilla instructions re Python bindings for PyQT5
Python Bindings
The Python bindings are in the Python directory. You must have either PyQt v4 or v5 already installed. QScintilla must also already be built and installed.
The configure, build and install the bindings for PyQt v4, run:
python configure.py
make
make install On Windows (and depending on the compiler you are using) you may need to run nmake rather than make.
If you want to build the bindings for PyQt v5 then pass –pyqt=PyQt5 as an argument to configure.py.
But when I run the below command it complains about PyQt5 not being installed
python configure.py --qmake=/users/marklloyd/Qt/5.8/clang_64/bin/qmake --pyqt=PyQt5
Error: Unable to import PyQt5.QtCore. Make sure PyQt5 is installed
If I run brew info I can see the dependency is OK
brew info qscintilla2
qscintilla2: stable 2.10 (bottled) Port to Qt of the Scintilla editing component https://www.riverbankcomputing.com/software/qscintilla/intro /usr/local/Cellar/qscintilla2/2.10 (135 files, 6.9MB) * Poured from bottle on 2017-03-21 at 13:54:46 From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/qscintilla2.rb
==> Dependencies Required: qt5 ✔, sip --with-python3 ✔, pyqt5 ✔
==> Requirements Recommended: python3 ✔ Optional: python ✔
==> Options
--with-plugin Build the Qt Designer plugin
--with-python Build Python bindings
--without-python3 Do not build Python3 bindings
this is OSX 10.12.3 FYI and I am more than happy to admit I'm not an expert at this level of stuff at all.
I'm trying to get QScintilla working so I can get PyMakr from Pycom installed and working
Pymakr-master marklloyd$ python install.py
Checking dependencies
Python Version: 2.7.12
Found PyQt5
Found pyuic5
Sorry, please install QScintilla2 and
its PyQt5/PyQt4 wrapper.
Error: cannot import name Qsci
Anyone else suffered similar issues?
To answer Barrys comment
pip3 install QScintilla returns
Requirement already satisfied:
QScintilla in /Library/Frameworks/Python.framework/Versions/3.6/lib/python‌​3.6/site-packages
Requirement already satisfied: PyQt5>=5.7.1 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python‌​3.6/site-packages (from QScintilla)
Requirement already satisfied: sip<4.20,>=4.19 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python‌​3.6/site-packages (from PyQt5>=5.7.1->QScintilla)
pip3 install pyqt5
Requirement already satisfied: pyqt5 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
Requirement already satisfied: sip<4.20,>=4.19 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from pyqt5)

Python at Synology, how to get Python3 modules installed and where is Python2.7 installed?

Can you please advise me how to get Python3 with modules running at my Synology (DS214play, with DSM 6.0.1-7393 Update 1)?
What I want: run Tweepy and other modules in Python3 on my Synology.
Where I am stuck:
how to get PIP3 to install Tweepy, if I try I get: Requirement already up-to-date: pip in /usr/lib/python2.7/site-packages
Apparently I have a Python 2.7 installed but I was not aware...
root#DiskStation:/volume1/#appstore/python3/include# ls
get-pip.py python3.4m
root#DiskStation:/volume1/#appstore/python3/include# python3 get-pip.py
-ash: python3: command not found
root#DiskStation:/volume1/#appstore/python3/include# python get-pip.py
Requirement already up-to-date: pip in /usr/lib/python2.7/site-packages
So to get PIP3 to work I need to understand where Python2.7 is installed and maybe even how to remove it (if this is necessary).
And it would be good to know which Python3 package would be best to use (default from Synology DSM package manager or the SynoCommunity Python3 pacakge)
Because I can see Python3 in the DSM package manager and in the related folders when connected with SSH (using PuTTY) to my Synology.
But I do not see any package for Python2.7 (which I believe must be there) and I cannot find any Python 2.7 folders when connected with SSH even tough I have the hint that there must be a " /usr/lib/python2.7/site-packages " folder somewhere...
-> The default Python3 from Synology DSM package manager is in a py3k folder:
admin#DiskStation: /volume1/#appstore/py3k/usr/local/bin$
python3
-> the SynoCommunity Python3 package installs in a different place:
admin#DiskStation: /volume1/#appstore/python3$ ls
bin etc include install.log lib openssl.cnf share
admin#DiskStation: /volume1/#appstore/python3/bin$ ls
2to3 busybox bzfgrep bzmore delgroup fatattr infocmp lzmainfo pip3 python3.4 reset start-stop-daemon tset virtualenv-3.4 xz
2to3-3.4 bzcat bzgrep captoinfo deluser gpg-error infotocap mpicalc pip3.4 python3.4m shuf tabs unlink wheel xzcat
addgroup bzcmp bzip2 clear dumpsexp hmac256 lzcat nice pydoc3 pyvenv speexdec tic unlzma xmlcatalog xzdec
adduser bzdiff bzip2recover c_rehash easy_install idle3 lzma openssl pydoc3.4 pyvenv-3.4 speexenc toe unxz xmllint
bunzip2 bzegrep bzless curl easy_install-3.4 idle3.4 lzmadec pip python3 renice sqlite3 tput virtualenv xsltproc
admin#DiskStation:/volume1/#appstore/python3/bin$ python3
-sh: python3: command not found
What I have done:
I installed Python3 using the Synology DSM package manager and then connected with SSH (using PuTTY) to my Synology and set the PATH and used PIP to install Tweepy and other modules.
I believe it was with some commands like: (unfortunately mostly copy pasted without knowing exactly what it means in detail...)
root#DiskStation:~# curl -k https://bootstrap.pypa.io/get-pip.py | python
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1488k 100 1488k 0 0 1577k 0 --:--:-- --:--:-- --:--:-- 1577k
Collecting pip
Using cached pip-8.1.2-py2.py3-none-any.whl
Collecting setuptools
Downloading setuptools-23.1.0-py2.py3-none-any.whl (435kB)
100% |████████████████████████████████| 440kB 551kB/s
Collecting wheel
Using cached wheel-0.29.0-py2.py3-none-any.whl
Installing collected packages: pip, setuptools, wheel
Successfully installed pip-8.1.2 setuptools-23.1.0 wheel-0.29.0
I was able to run scripts based on this and quite happy. Until I got some (Unicode) errors and from the error log saw that it is a 2.7 version of Python that runs on my Synology. It seems these Unicode issues are solved in Python3 (which I have on my PC as well) so I would like to have Python3 on Synology as well.
And the 2.7 version is indeed installed, if I connect with SSH and type Python I get:
admin#DiskStation:~$ python
Python 2.7.11 (default, May 13 2016, 05:16:12)
[GCC 4.9.3 20150311 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
This is strange because I do not see any Python 2.7 package at Synology in the package manager so I must have installed 2.7 through some SSH command that I intended just for PIP.
I had the default Python3 package at Synology installed and if I type admin#DiskStation:~$ python3
I did get the python3 ready to work with.
Within the /volume1/#appstore/py3k/ I see all kinds of Python and PIP versions and the python3 works well. However without any modules and the PIP3 does not work ("command not found"), I tried it from all possible directories and in all kinds of formats as suggested on similar Q&As e.g. pip3.4 install tweepy, pip3 install tweepy, etc.
So now using the DSM package manager I have deinstalled Python3 and installed the SynoCommunity Python3 (as suggested on the Synology forum here) which shows a different directory structure. But seems even worse because now I see no references to Python 2.7 anymore (but still it runs so must be there) and even cannot get python3 started:
admin#DiskStation:~$ cd /volume1
admin#DiskStation:/volume1$ cd #appstore
admin#DiskStation:/volume1/#appstore$ cd python3
admin#DiskStation:/volume1/#appstore/python3$ ls
bin etc include install.log lib openssl.cnf share
admin#DiskStation:/volume1/#appstore/python3$ cd bin
admin#DiskStation:/volume1/#appstore/python3/bin$ ls
2to3 bzcmp bzless deluser idle3 lzmainfo pydoc3 renice tabs unxz xz
2to3-3.4 bzdiff bzmore dumpsexp idle3.4 mpicalc pydoc3.4 reset tic virtualenv xzcat
addgroup bzegrep captoinfo easy_install infocmp nice python3 shuf toe virtualenv-3.4 xzdec
adduser bzfgrep clear easy_install-3.4 infotocap openssl python3.4 speexdec tput wheel
bunzip2 bzgrep c_rehash fatattr lzcat pip python3.4m speexenc tset xmlcatalog
busybox bzip2 curl gpg-error lzma pip3 pyvenv sqlite3 unlink xmllint
bzcat bzip2recover delgroup hmac256 lzmadec pip3.4 pyvenv-3.4 start-stop-daemon unlzma xsltproc
admin#DiskStation:/volume1/#appstore/python3/bin$ python3
-sh: python3: command not found
admin#DiskStation:/volume1/#appstore/python3/bin$ python
Python 2.7.11 (default, May 13 2016, 05:16:12)
[GCC 4.9.3 20150311 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
So I reached the point to ask for some tips, hints and advice.
(1)install python2.7 and python3.5 from DSM packages
(2)ssh login & sudo -i
(3)run python and run python3, if both work go next.
(4)run pip -V should return pip 10.0.1, it is for python2.7
(5)run pip3 -V return "command not found", ..because the path is not right.
(6)try /volume1/#appstore/py3k/usr/local/bin/pip3 -V,
if sucess. go next. now you can install module for python3, it's different path depends on your system, command for example: /volume1/#appstore/py3k/usr/local/bin/pip3 install numpy should be work!
(7)for convenient, shorter command is good for use,so go next step:
sudo vi .profile, (or .bashrc for specific user login)
(8)add alias at the end:
alias pip3='/volume1/#appstore/py3k/usr/local/bin/pip3'
(9)source .profile or sudo reboot
(10)test pip3 -V, should work for python3.x
Ok, many thx for the replies, I solved it with:
Confirmed that Python 2.7.9 is installed by default in Synology DSM 5.2 (and not visible in package center).
I was able to add modules to Python3 by specifically evoking the pip module installation for Python3 using this command:(thx to this Q&A)
/volume1/#appstore/py3k/usr/local/lib/python3.5/site-packages/pip install tweepy
(installing the tweepy module in this case)
And FYI the full command overview:
admin#DiskStation:/volume1/#appstore/py3k/usr/local/lib/python3.5/site-packages$ sudo -i
Password:
root#DiskStation:~# curl -O https://bootstrap.pypa.io/get-pip.py
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1488k 100 1488k 0 0 1704k 0 --:--:-- --:--:-- --:--:-- 1703k
root#DiskStation:~# sudo python3 get-pip.py
Requirement already up-to-date: pip in /volume1/#appstore/py3k/usr/local/lib/python3.5/site-packages
root#DiskStation:~# pip install tweepy
Requirement already satisfied (use --upgrade to upgrade): tweepy in /usr/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): six>=1.7.3 in /usr/lib/python2.7/site-packages (from tweepy)
Requirement already satisfied (use --upgrade to upgrade): requests>=2.4.3 in /usr/lib/python2.7/site-packages (from tweepy)
Requirement already satisfied (use --upgrade to upgrade): requests-oauthlib>=0.4.1 in /usr/lib/python2.7/site-packages (from tweepy)
Requirement already satisfied (use --upgrade to upgrade): oauthlib>=0.6.2 in /usr/lib/python2.7/site-packages (from requests-oauthlib>=0.4.1->tweepy)
root#DiskStation:~# python3 ^C
root#DiskStation:~# python3 /volume1/#appstore/py3k/usr/local/lib/python3.5/site-packages/pip install tweepy
Collecting tweepy
Using cached tweepy-3.5.0-py2.py3-none-any.whl
Collecting requests-oauthlib>=0.4.1 (from tweepy)
Using cached requests_oauthlib-0.6.1-py2.py3-none-any.whl
Collecting requests>=2.4.3 (from tweepy)
Using cached requests-2.10.0-py2.py3-none-any.whl
Collecting six>=1.7.3 (from tweepy)
Using cached six-1.10.0-py2.py3-none-any.whl
Collecting oauthlib>=0.6.2 (from requests-oauthlib>=0.4.1->tweepy)
Using cached oauthlib-1.1.2.tar.gz
Building wheels for collected packages: oauthlib
Running setup.py bdist_wheel for oauthlib ... done
Stored in directory: /root/.cache/pip/wheels/e6/be/43/e4a2ca8cb9c78fbd9b5b14b96cb7a5cc43f36bc11af5dfac5b
Successfully built oauthlib
Installing collected packages: requests, oauthlib, requests-oauthlib, six, tweepy
Successfully installed oauthlib-1.1.2 requests-2.10.0 requests-oauthlib-0.6.1 six-1.10.0 tweepy-3.5.0
(And I uninstalled the SynoCommunity Python3 package again and now use the DSM package center Python3 version)
I'm not sure you can remove Python 2 altogether, but you can install Python 3 and evoke it specifically instead of Python 2.
First, make sure Python 3 is Installed:
Log into your Synology via the web administration and in the 'Package Center' make sure 'Python 3' is installed. (You will find it under 'Developer Tools' within the 'Package Center')
Next, specifically evoke Python 3 by simply calling python3
You could also try using the locate command on your Synology to find the exact location of Python 2. To do this enter the following on your Synology:
ipkg update
ipkg install mlocate
And here is a tutorial on how to use the command: http://www.thegeekstuff.com/2012/03/locate-command-examples/
Good luck!
Also,
If you don't have luck on Stack Overflow I'd run over to the Synology Forums for help as well: https://forum.synology.com

Categories