Python(pip): Module Not Found, after installing my own package from pypi - setuptools

So i have created this package called footyplots and have uploaded it to PyPi. It has installed successfully on my machine.
Here is my setup file.
Here is the directory tree.
Here is the error when I am importing it.
I don't know what's wrong. Can somebody help.

Your setup.py is missing the packages argument to the setuptools.setup function call. You might also want to double check the package_dir argument, you might not need it at all.
Try:
either packages=['footyplots']
or packages=setuptools.find_packages()

Related

fix setuptools version when installing libraries using setup.py

This question is somewhat similar to the one here, but I cannot make it work.
So suppose that I have a set of packages (say 2) to install and I want to use pipenv. If I do pipenv install on the directory with a suitable Pipfile the installation fails because there is some metadata issue when installing one of the libraries (say libX) contained in install_requirements of one of the packages. It seems that the problem can be fixed by downgrading the version of setuptools to <=58.0.0.
OK. Now, if I first install that version of setuptools<=58.0.0 in the venv and then install my packages, everything works fine. The issue is that the Pipenvfile does not respect the order when installing, so something like
[packages]
setuptools = "<=58.0.0"
pckg1 = {<github path 1>}
pckg2 = {<github path 2>}
is not ensured to work. Also, by default the seed packages added to the venv include setuptools==65.6.3.
So the idea is to be able to restrict the version of setuptools that is used to check the metadata of the libraries in libX, to mimic the above scenario in which setuptools was installed first. Is there a way to do that?
I have tried placing setuptools<=58.0.0 at the top of the requirements.txt that defines the install_requirements of the problematic package, but it does not work.
If have also tried to fix or restrict the version of libX contained in that requirements.txt file but, surprisingly, pipenvdoes not seem to care: a verbose install shows that it keeps downgrading libX well below the restriction - "using cached libX-vX.X.X"- until it uses a version for which the metadata generation fails (why on earth does it do that, even if I call it with pipenv --clear install?).
I am a bit lost about what could be the best solution here. Any help would be very appreciated.

I can't install any extensions on vscode

I tried a lot of methods to install, but the following log does not install.
I'm having a problem with other extensions not being installed. Is there a solution for this?
As you see the error there is a given paths, these are added into PATH but actually not exist in you system.
Remove them or create them.

Getting Install path of a package just installed by chocolatey in powershell

After I install a package in powershell by using
"choco install $package" where package is taken from a config file and would look like "WinRar" so I would be doing choco install WinRar, how do i get the exact path this package was just installed to?
For example when I am installing PhantomJS using this, it gets installed to C:\ProgramData\chocolatey\lib\PhantomJS\tools\phantomjs-2.1.1-windows and I as the developer know that, but since I need to add this to the env path, depending on which version the install command installs, the path will be different. I need to get the exact path so i can set the environmental variable to right place.
PhantomJS is just one example, but a lot of packages get installed into directories where their version is apart of the path and getting the path from the powershell install scripts would really be helpful.
Is there anything like this available for the package manager? I assume figuring out where the package just got installed to should be possible because I see it displayed on my terminal window, just don't know how to access it in powershell.
Thanks.
Currently there is not a way, but there is a thought to maybe provide back a list of package results with that information (along with more). That is still in a feature request so look for it to be developed in the coming months.
You could parse the Chocolatey output to determine where Chocolatey saw things get installed and we are working to make that detection even better.

Error on Yum update

I'm unfortunately not very experienced in CentOS administration, and was hoping someone might be able to help me understand and get past a small hurdle. I was hoping to run yum update on the system, but ran into some Transaction Check Errors:
file /etc/php.ini from install of php55-common-5.5.11-1.el6.x86_64 conflicts with file from package php-common-5.3.3-40.el6_6.x86_64
file /usr/lib64/php/modules/curl.so from install of php55-common-5.5.11-1.el6.x86_64 conflicts with file from package php-common-5.3.3-40.el6_6.x86_64
file /usr/lib64/php/modules/fileinfo.so from install of php55-common-5.5.11-1.el6.x86_64 conflicts with file from package php-common-5.3.3-40.el6_6.x86_64
file /usr/lib64/php/modules/phar.so from install of php55-common-5.5.11-1.el6.x86_64 conflicts with file from package php-common-5.3.3-40.el6_6.x86_64
file /usr/lib64/php/modules/pdo.so from install of php55-pdo-5.5.11-1.el6.x86_64 conflicts with file from package php-pdo-5.3.3-40.el6_6.x86_64
file /usr/lib64/php/modules/pdo_sqlite.so from install of php55-pdo-5.5.11-1.el6.x86_64 conflicts with file from package php-pdo-5.3.3-40.el6_6.x86_64
file /usr/lib64/php/modules/sqlite3.so from install of php55-pdo-5.5.11-1.el6.x86_64 conflicts with file from package php-pdo-5.3.3-40.el6_6.x86_64
It sort of looks like it's saying that some newer version files are conflicting with older version files. Is there a standard way to fix this? I was mainly just trying to update so that I could install Java later, but wasn't expecting to run into these errors. If it helps, the server is mainly being used for hosting a few websites with apache and mysql. Thanks so much for any help, it's greatly appreciated.
Edit: To add some more clarification, I had previously edited the baseurl variable in the /etc/yum.repos.d/centalt.repo file, which was originally set to
baseurl=centos.alt.ru/repository/centos/6/$basearch
The reason I changed the location was because I was previously getting an error when trying to run yum update, mentioned in this other stackoverflow question https://unix.stackexchange.com/questions/132674/repository-metadata-repomd-xml-for-repository-mratwork-centalt which had an answer recommending replacing the URL with
baseurl=mirror.sysadminguide.net/centalt/repository/centos/6/$basearch
Is there a different url I should be using instead?
You have a non-official repository which provides the php55-* packages which conflict with the official php-* packages.
You currently have the php-* versions installed.
If you want to switch you can try manually installing the matching php55-* package for every php-* package you have installed in one yum command (though that may not work).
If it doesn't, you might need to remove all the php packages you have installed first and then install the php55 versions after that.

Automatically correct Lingua::LinkParser include lib path

I'm building a script that will run on an EC2 instance that will automatically install our required packages and modules.
I'm having an issue with Perl module Lingua::LinkParser.
During compile it complains
LinkParser.xs:5:27: error: link-includes.h: No such file or directory
On Ubuntu link-includes.h is provided by package link-grammar and is installed in /usr/include/link-grammar/.
However Lingua::LinkParser's Makefile.PL is hard-coded(?) to look in /usr/local/include/link-grammar/.
Is there simple-ish way to resolve this issue?
Distroprefs
Best practice for using slightly modifying module from CPAN?
Install Perl modules that require customized options via CPAN
mob's suggestion above to just symlink /usr/include/link-grammar to /usr/local/include/link-grammar is the simplest way of handling this situation and this is what I'll use.